Hacker News new | past | comments | ask | show | jobs | submit | DaNmarner's comments login

In a sense, that's the goal :) Any Swift dev who's used python-requests should feel right at home with Just.


This is just another manifestation of software eating the world. What makes Google competitive in any industry? Its talent in software.


>What makes Google competitive in any industry?

Having a goose who lays golden eggs (search + adsense) to subsidize development?


Basically any new business needs capital, so not sure what you mean here. Where do you think VCs get their money, for instance?


It's about the cost of the capital, not the amount. VC capital is expensive since you give away equity.


This might be easily overlooked: optional has been introduced (back-ported?) to Objective-C in the form of nullability annotation!


No it hasn't.

Optional is a Swift type that contains a value of any type. Obj-C doesn't have anything matching that behavior at all.

What's been done here is Obj-C has gained the ability to annotate any pointer valued type as either nullable or non-nullable. This does not affect the runtime behavior of the code in the slightest. It doesn't even affect the semantics of Obj-C. All it does for Obj-C is let the compiler yell at you if you pass nil to a non-nullable parameter / property.

The real point of these annotations is so Swift can be more intelligent when translating the obj-c API to Swift, choosing to use the correct optional type (or no optional type at all).


Not exactly. ObjC code cannot usefully benefit from those annotations (yet? more likely ever). At most, it's good for documenting your ObjC code for fellow readers. The actual use appears in the Swiftland where instead of implicitly unwrapped optionals you get proper explicit optionals or explicit non-optionals.


The benefit to working with the Cocoa APIs will be immense, though.

I assume that, now that this feature exists, Apple will begin annotating their Obj-C APIs.


They already started doing it a few months ago with private annotations. This "nonnull"/"nullable" syntax is a result of their work on annotating Cocoa APIs.


They've been doing it for a while in the Swift overlay module. I'm really happy that this is officially added to obj-c because it provides very valuable API documentation, even if it won't have much practical effect on the code.


It looks like the annotations will allow the compiler to produce warnings when compiling the Objective-C code, so that's something:

"However, nullability annotations—in addition to improving the experience in Swift—provide new warnings in Objective-C"


This is quite horrible. I wish they would leave Objective C alone.


On a side note, Swift's enum provides complete support for sum type.


They may not be recursive however


You can work around that using a "Box" type that wraps a value in a reference:

    class Box<T> {
        var contents : T
        init(_ initialContents : T) {
            contents = initialContents
        }
    }

    enum BinaryTree {
        case Leaf
        case Branch(Box<BinaryTree>, Box<BinaryTree>)
    }


I grew up reading SciFi in both Mandarin and English. In my impression, though not flawless, this series is the only long-form novel produced in China that can stand among the best SciFi literature in the west.

It deserves to reach a larger audience :)


To those who want to try something else, here is an incomplete (personal) list of famous contemporary Chinese Sci-Fi novel authors:

Wang Jinkang (王晋康, quite productive), Chen Qiufan (陈楸帆, just started to publish books recent years), Han Song (韩松)

To my surprise, when I wrote this list, I suddenly realized how few names I could think of, even after I looked up in a Chinese website Douban ( http://book.douban.com/tag/%E4%B8%AD%E5%9B%BD%E7%A7%91%E5%B9... ). The truth is: there are quite a few good Sci-Fi writers with a whole bunch of brilliant Sci-Fi short stories in China, but few of them ever writes full-length novels, not to mention "good" or "famous" ones.


So you would say that the article is correct about the lack of science fiction authors in China? Are there any other Mandarin SF novels that you would recommend, even if they don't measure up to the level of "The Three-Body Problem"? I grew up reading exclusively western SF (Asimov, Clarke, Niven, Heinlein, Vinge, etc) and reading SF is still one of my favorite pastimes. I took some Mandarin language classes in College, and I'd like to try reading some Chinese SF.


Does anyone know how well "aligned" the texts are? It's rare to find good bilingual texts for light reading/studying.


Do you have any another Mandarin SciFi that you can recommend?


As a native English speaker fluent in mandarin, I agree.


I did the same. Whoever submitted this need to learn what "again" means.


I submitted this, and as far as I can tell I have a pretty reasonable idea of what "again" means. If you actually click the link, you'll see that it's the title of the original article, by Phil Plait.


The story boils down to:

1. Is the second law of thermodynamic wrong? 2. Does P equals NP (or, if 1 is true, then how and how long will it take to solve it?) 3. What's God?


Oh goodness, this hilarious.

Someone posting a link to a short story by one of the greatest SF writers all of time, whose writings spawned entire threads of reflexion and discussion in many disciplines; and a HN comment being a dismissive tl;dr.


I didn't find the comment to be dismissive actually. What's wrong with writing a story that explores the boundaries of science and god? That must have been a pretty natural thing for someone living in Asimov's era to do.


De gustibus non est disputandum, as they say. I don't care for this story either, it's less of an actual story, and more of a "what if" that feels somehow a bit corny to me.


I actually consider pointing out the scientific elements of a SF piece is the best kind of compliment.


RPython is the new C?


Absolutely not. RPython is a language to write dynamic languages virtual machines. That's a much less broad scope than C aims at (and achieves).


In addition to fijal's comment: I also heard somewhere that RPython is a) not strictly specified and b) may change when needed without notice. So I would stay clear of it. :)


we removed that from the docs, it's kinda stable by now (but it's still an atrocious language to use, just beats C/C++ for that particular task by a lot)


Out of curiosity, whats so atrocious about it? The slow translation step or language idiosyncrasies?


Slow compilation, undocumented semantics, and most importantly: atrocious error messages..


However "X" body bags Vim, I will never switch.


Here's a very recent audio interview of its founder: http://techzinglive.com/page/1269/223-tz-interview-zak-homou...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: