Rust libraries that need to be written
mail.mozilla.org
mail.mozilla.org
I also like the pragmatic approach, instead of saying "date APIs are hard, so we'll think until we've cracked it" they just explicitly plan on copying a popular one (the Joda-Time Java API, http://www.joda.org/joda-time/).
http://www.reuters.com/article/2014/05/09/us-oracle-google-r...
For example, Joda has a member function called .getYear(). Oracle java.util.date also has a .getYear(). At the time the author created Joda, the type of restrictive API copyright ruling that Oracle won wasn't part any programmer's mindset. If it was, maybe Joda would have called it .getAnnum() or .getOffsetfromZeroCE() or .getYYYYComponent().
If a company gets to release their API first with a .ToString() ... the next company has to call it something else such as .ReifyAsString() and then then next company after that has to name their API with yet another synonym such as .Stringify().
Continuing that scenario, could one even publish a blog post listing the complete 1-to-1 translation of Company A's API to Company B's API? Could one legally write a program that automatically converts one source code listing's API calls to another? Would those rosetta stone type of publications and dev tools be in violation of API copyrights?
Joda-Time doesn't copy 100% java.util.date but I don't know what the threshold is.
The evidence showed that Oracle had "unlimited options as to the selection
and arrangement of the 7000 lines Google copied." Appellant Br. 50. Using
the district court's "java.lang.Math.max" example, Oracle explains that the
developers could have called it any number of things, including
"Math.maximum" or "Arith.larger." This was not a situation where Oracle was
selecting among preordained names and phrases to create its packages. As
the district court recognized, moreover, "the Android method and class names
could have been different from the names of their counterparts in Java and
still have worked." Copyrightability Decision, 872 F. Supp. 2d at 976.
Because "alternative experessions [we]re available," there is no merger.
See Atari, 975 F.2d at 840.
http://www.cafc.uscourts.gov/images/stories/opinions-orders/...pp. 30-31.
(Again, not a lawyer or legal advice. This is just my layman's understanding.)
Tangentially, I really disagree with the ruling. First, we have to figure out where to draw the line: if you can copyright a big API, can you copyright a small one (like, say, Iterable)? Second, there's legal precedent for allowing partial copies in cases where it's necessary for interoperability (Sega v. Accolade). Finally, the appeal for Lotus v. Borland allowed for wholesale copy of a command hierarchy for user interfaces, which has parallels to application programming interfaces that I think any programmer would find obvious. My favorite quote from that case:
[51] That the Lotus menu command hierarchy is a "method of operation" becomes
clearer when one considers program compatibility. Under Lotus's theory, if a
user uses several different programs, he or she must learn how to perform the
same operation in a different way for each program used. For example, if the
user wanted the computer to print material, then the user would have to learn
not just one method of operating the computer such that it prints, but many
different methods. We find this absurd. The fact that there may be many
different ways to operate a computer program, or even many different ways to
operate a computer program using a set of hierarchically arranged command
terms, does not make the actual method of operation chosen copyrightable; it
still functions as a method for operating the computer and as such is
uncopyrightable.
http://www.law.cornell.edu/copyright/cases/49_F3d_807.htmAnyway, I know you didn't ask for my opinion on the ruling but I just wanted to rant a little :) The circuit's ruling really pissed me off. Programming is hard enough without having to worry about whether or not our APIs are covered by an existing copyright.
I made a getYear function a long time ago, stop stealing my goddamn copyrighted code!
Yeah. Let's just stop writing code alltogether shall we? Together someone somewhere probably has our future code pre-copyrighted.
If you respect stupidity, stupidity wins. Don't let it go unchallenged.
I think they're safe, especially given that the process has actually come full circle now.
The new date time package in Java 8 (java.time) was developed under JSR310, whose spec lead is none other than the developer of Joda-Time, Stephen Colebourne [1]
For those that are interested, he wrote an interesting blog post way back in 2009 on why they chose to develop JSR-310 instead of using Joda as is [2], as well a more recent piece on the bits that didn't make the cut (and are thus now part of a separate project) [3].
[1] https://jcp.org/en/jsr/detail?id=310
[2] http://blog.joda.org/2009/11/why-jsr-310-isn-joda-time_4941....
[3] http://blog.joda.org/2014/02/new-project-threeten-extra-for-...
http://blog.joda.org/2009/11/why-jsr-310-isn-joda-time_4941....
The language constructs might not be as close to Rust's, but the semantics benefit from years of additional experience and thought.
This is pretty much why I haven't used Rust for any serious application development. Any HTTP or TCP connection I'd want to make would be over TLS and there are better options than importing c crypto libraries in Rust.
I get what they're trying to do, and the conservative nature is admirable but I just want to "get things done" and while Rust is nice not having crypto is as is mentioned not tenable for application developers.
Crypto is very critical. Many people do not want their application to send their critical data in the clear.
They're not insecure about being able to make a workable crypto api. They are aware that it's not a good idea to implement crypto in a high level language that's not been engineered for security yet.
Their solution is to wrap a proven C crypto library, which is probably what good Go and JVM languages do also (I wouldn't trust one that doesn't) and it's probably going to be ready within a month or two.
edit: just an aside, why would you terminate your SSL in Go/Java, it's good practice to have a proxy like nginx or haproxy do that for you.
I did, they said it would take a very long time.
> Their solution is to wrap a proven C crypto library
This is good. I don't have a problem with that, because that's what you'd have to do yourself right now if you wanted to do any kind of basic crypto with rust, include a C library and wrap it with boiler plate just to get it working.
> which is probably what good Go and JVM languages do
Nope, Go implemented their own crypto:
https://code.google.com/p/go/source/browse/#hg%2Fsrc%2Fpkg%2...
and, in case you are curious:
https://groups.google.com/forum/#!topic/golang-nuts/0za-R3wV...
I can think of a couple obvious reasons why they would take this approach: (1) Crypto is hard, and they want to get the core platform out the door in a usable form on a relatively tight schedule. (2) Designating an official Rust crypto solution would be a social statement about what crypto code you're supposed to use in Rust, even if the quality of the code itself is inferior due to being newly written and unvetted. This is riskier than just using existing C libraries, because at least now they can't be blamed for any horrible security bugs in libraries they didn't write.
If you'd only read past the specific sentence you quoted, you'd see that they do have plans to build crypto solutions in Rust, but that they're taking an extremely conservative approach to making it happen, and developing it "out of tree," ie. not as part of the Rust language codebase. Moving conservatively with respect to crypto development is not inappropriate. I'm sure you understand the sensitive nature of crypto libraries and why they need to be treated with as much care as possible.
I'm not trying to write a middlebrow dismissal, I'm simply explaining honestly why I don't use Rust and why I will not use Rust for the foreseeable future. The implication being that it's not just about me, but any application developer would pass on Rust as long as the only crypto options are to import c libraries. I could be mistaken in this.
You can't take away a badly-designed stdlib. Now people already use your poorly-designed APIs. You have to support them for 50 years.
Rust is memory safe and C is not, so it seems to go against the benefits of Rust.
We have crypto experts on staff who could write this kind of thing, but we have a shipping schedule to meet and crypto is the kind of thing we definitely don't want to rush out the door.
I hope that the "wrap C libraries" approach then is a short-term approach, and that doesn't mean that you don't plan on having those crypto experts build crypto libraries in Rust (hopefully, with compatible APIs, so that there can be a seemless transition down the road.)
Just measuring what is meant by 'year' is a tricky problem: https://en.wikipedia.org/wiki/Year#Sidereal.2C_tropical.2C_a...
The List:
1. HTTP
2. Crypto
3. Unicode
4. I18n & Localization
5. Date/Time
6. Generic SQL
These are things you can't just throw together quickly, it takes years to do these things right.
EDIT: I see your points guys, wrapping up C code will make some of these things go pretty quickly, and your also right about a lot of production apps - at least low level systems stuff - not dependening on hardly any of these. I suppose I was thinking of this as an app developer, and if your talking about creating desktop apps in Rust, like a Browser or a SQL-Editor etc, every one of these libs has to be at least pretty darn good - otherwise its just a headache for you as a dev.
Of course, that isn't to diminish the importance of having high-quality, safe, idiomatic implementations of these things, but that shouldn't stop you from using Rust in production.
Although the internationalization story looks pretty bad, I'm heartened by my firm impression that no language does it well, that serious apps (like Firefox) tend to roll their own. One of our driving philosophies in Rust is to get actual production quality subsystems into the standard library by proving them in applications like Servo.
There's nothing stopping Rust from having a healthy ecosystem of third-party libraries that provide that functionality. Yes, including C libraries.
I get that Rust is targeting low-level, "systems" programming, but I really don't see how you can't also be a very performant server language.
> they both didn't even hit alpha stage before they had
> fantastic HTTP/networking libraries
Rust is not yet alpha. It's still pre-alpha.