Does apportable work with UIKit classes? - apportable

For the last 30 minutes I've been checking out Apportable and am now installing it.
After going over the docs, I can't see whether or not UIKit is supported.
Is it? If so, what is the look and feel on Android?

It is not supported in the Starter (free) version (other than some rudimentary classes). It is supported in the Indie version and above, but it seems it is beta. See: http://www.apportable.com/pricing, where holding the mouse over "Advanded Frameworks" says it supports UIKit.

Related

What is Swift 4.1.50?

I'm playing around with the Xcode 10 beta, and I noticed while doing compile-time checks of the Swift version number that projects with the Swift Language Version set to Swift 4 in their Build Settings are reporting as Swift 4.1.50 (betas 2, 3, and 4 do this; I didn't get a chance to test beta 1). This strikes me as... bizarre, to say the least. The current AppStore version of Xcode, Xcode 9.4.1, reports its version as Swift 4.1.2.
So... What happened to Swift 4.1.3 through 4.1.49? Or is this a bug that I should file? Or is the 50 significant in some way?
You can test this yourself with my test file, Swift Version Checker
According to Jordan Rose on the Swift bug tracker:
This is the least bad answer we could come up with, given that we may still release more 4.1.x versions if there's, say, a bad security vulnerability in one of them. (This has happened before.) We needed a version number that was greater than any existing 4.1 version, but still less than 4.2.
We did consider other ideas, but this is the one we went with for maximum compatibility. We at least won't have this problem in the future thanks to SE-0212.
So, what I take from this is that there might still have to be an actual 4.1 release sometime in the future, but that would just be a security patch atop 4.1.2, so the logical number for that would be 4.1.3. Meanwhile, the pseudo-4.1 Swift that the Swift 4.2 compiler can digest needs its own number that also reflects it's a dialect of 4.1, and their conclusion was 4.1.50, which is safely far enough away from 4.1.2 to allow for as many security patches as they want.

Swift3 Linux vc Mac DispatchQueue

According to swift.org/migration-guide, dispatch and related functions have a great new swift interface (e.g. dispatch_async -> DispatchQueue.async). Also other foundation types have been added like Data and Date value types instead of NSData and NSDate.
However, on the open source version of swift3 (developer preview 1) on linux, ubuntu15.10 the compiler rejects all of these changes. In fact, looking at the open source version of swift and swift-corelibs on github, I don't actually see any of these changes. Since it will compile on XCode developer preview, this has lead me to believe either: I am doing something wrong on Linux or these changes have been made in the Apple branch and not the open source branch. Can anyone verify this and if the latter is the case, and if so, how do we know what changes will be in the Apple branch vs the open source branch?
As of Swift 3.0 release version GCD is available on Linux with simple import Dispatch, which is slightly confusing as it's not needed on iOS/macOS, where Dispatch module is imported by default.
Thanks to Brad Larson for finding the Foundation and Dispatch overlays in the source. According to swift.org:
SDK Overlays: Specific to Apple platforms, the SDK overlays
(implemented in stdlib/public/SDK) provide Swift-specific additions
and modifications to existing Objective-C frameworks to improve their
mapping into Swift. In particular, the Foundation overlay provides
additional support for interoperability with Objective-C code.
tl;dr anything in these folders are Apple platforms only. Still not sure why they restricted the Dispatch overlays to Apple Platforms since libdispatch is also open source and targeting linux, but this answers my initial question.
Edit: was able to confirm via swift mailing lists that the dispatch overlays do have some reliance on objective-c runtime. There is work to get them implemented for non-Darwin platforms but no guarantees on timing.
Check out the Swift 3 Evolution Github page. They list all the proposed changes to the language, and separate them by those that have been implemented and those that have not. Proposal SE-0088: Modernize libdispatch for Swift 3 naming is on the "yet to be implemented list" as are many other changes.
As far as Data and Date are concerned, I cannot say, since I believe that is part of the upcoming Core Libraries, and I have not yet been able to look at those in great detail yet. Perhaps you might check the Swift Core-Libs Github page as well, though the status page references work done on NSData and NSDate, no mention of the newer data types.

how to target haskell to android using jhc?

I want to write a Haskell function (module) of type: String -> String to call in Android. The easiest method seems to use JHC to generate C code, then use Android NDK to generate a shared library, but I could not find any documentation for JHC. Does JHC also use Cabal to build? Is JHC stable enough to use Parsec or Attoparsec library?
Back in 2011 I had limited success using JHC in a similar way, but targeting iOS instead of Android. Initial results were good in just getting the thing running, but we ended up discarding JHC in favor of GHC precisely because we started getting weird compile-time errors on programs that used Parsec. Bear in mind, this was in 2011 so JHC might have improved by a lot since.
If you want to give GHC a chance, I'd recommend looking at this example which uses GHC 7.8 to compile a game for Android. I haven't used it in anger yet, but I did manage to get it working on Docker, getting as far as rebuilding the game from scratch and installing it on a real Android device, so the approach definitely has merit.
UPDATE as of August 2017: Moritz Angermann has posted detailed instructions on targeting Android with a GHC cross-compiler.
Well a compiler called eta maybe the most convenient way now.it targets jvm and it will produce a jar file so you can directly put it in your project

Direct3D 11 effect files deprecated?

I've been playing around with Direct3D 11 a little bit lately and have been frustrated by the lack of documentation on the basics of the API (such as simple geometry rendering). One of the points of confusion brought on by the sparse documentation is the (apparent) move away from the use of effects for shaders.
In D3D11 all of the effect (.fx) support has been removed from the D3DX libraries and buried away in a hard to find (sparsely documented, of course) shared source library. None of the included examples use it, preferring instead to compile HLSL files directly. All of this says to me that Microsoft is trying to get people to stop using the effect file format. Is that true? Is there any documentation of any kind that states that? I'm fine doing it either way, but for years now they've been promoting the .fx format so it seems odd that they would suddenly decide to drop it.
Many professional game and graphics developers don't use the effects interfaces in Direct3D, and many of the leading game engines do not use them either. Instead, custom material/effects subsystems are built on top of the lower-level shader and graphics state state management facilities. This allows developers to do things like target both Direct3D and OpenGL through a common asset management pipeline.
The main issue is that the fx_5_0 profile which is needed to compile Effects 11 shaders with the required metadata is deprecated by the HLSL compiler team. The runtime is shared-source, but the compiler is not. In the latest D3DCompiler (#47) it emits a warning about this. fx_5_0 was never updated for some newer language aspects in DirectX 11.1 and 11.2, but works "as is" for Direct3D 11.
The second issue is that you need D3DCompile APIs at runtime to make use of Effects 11. Since D3DCompile was 'development only' for Windows Store apps for Windows 8.0 and Windows phone 8.0, it wasn't an option there. It is technically possible to use Effects 11 today with Windows Store apps for Windows 8.1 and Windows phone 8.1 since D3DCompile #47 is part of the OS and includes the 'deprecated/as-is' compiler support for fx_5_0, but this use is not encouraged.
The bulk of the DirectX SDK samples and all the Windows Store samples avoid use of Effects 11. I did post a few Win32 desktop samples that use it to GitHub.
UPDATE: With the release of the legacy Microsoft.DXSDK.D3DX NuGet repacking of the original D3DX #43, I was able to update the rest of the legacy DirectX SDK samples so they can build with the modern Windows SDK and not require the legacy DirectX SDK to be installed. Most of the Direct3D 9 and Direct3D 10 samples, and a few Direct3D 11 samples, all use legacy Effects. See GitHub.
So in short, yes you are discouraged from using it but you still can at the moment if you can live with the disclaimers.
I'm in the exact same position, and after Googling like crazy for even the simplest sample that uses D3DX11CreateEffectFromMemory, I've too come to the conclusion that .fx file support isn't their highest prio. Although it is strange that they've added the EffectGroup concept, which is new to 11, if they don't want us to use it.
I've played a little with the new reflection API, so it looks like it will be pretty easy to hack together your own functions for setting variables etc, in essence creating your own Effect-class, and the next step is going to be to see what support their is for creating render state blocks via the API. Being able to edit those directly in the .fx file was very nice, so hopefully something like that still exists (or, at worst, I can rip that part from the Effect11 code).
There is an effect runtime provided as a sample in the DirectX SDK that should be able to help you to use .fx files.
Check out the directory: %DXSDK_DIR%\Samples\C++\Effects11
http://msdn.microsoft.com/en-us/library/ff476261(v=VS.85).aspx
This suggests that it can take a shader or an effect.
http://msdn.microsoft.com/en-us/library/ff476190(v=VS.85).aspx
Also, what is the difference between a shader and an effect?

Is there a "Resharper-like" addin for MonoDevelop?

I've googled and not come up with much. Has anyone run across something like Resharper for Mono?
Not that I'm aware of, no. A few people have discussed it but nothing concrete has emerged. We've been trying to implement some of the low-hanging fruit among the R# features that matter to people, such as the camelCase completion list matching - please file enhancement bugs if you can think of any more!
Also, now that MonoDevelop is no longer GPL there's the possibility that JetBrains could actually implement a R# addin for MD, if there's enough demand. R# as whole is immensely complex, so I don't imagine anyone else could build a decent equivalent any time soon.
UPDATE: There is an experimental Resharper-like source analysis and quick fix feature built into MonoDevelop 3.0. It can be enabled in Preferences.

Resources