Live data from Hacker News

Jiff: Datetime library for Rust

github.com

71–80 of 249 posts

Re: Jiff: Datetime library for Rust

#71
post #6

A little off topic but does anyone know the purpose of dual licensing MIT and the UNLICENSE? It seems like the second should already allow anyone to do whatever they want…

The unlicense is considered problematic in various jurisdictions, among them Germany - under German law, you cannot relinquish certain rights that are associated with the author at all. Dedicating something to the public domain is not a valid concept here. This means the whole license could be declared invalid in court. Other jurisdictions may be similarly problematic- thus the fallback to MIT There’s a stackoverflow…

Never understood why anyone uses this one; it's just too potentially messy, and a permissive license like 0BSD provides the intended effect without the risk.

Re: Jiff: Datetime library for Rust

#72
post #4

Earlier quoted context omitted.

If only Rust had named function parameters, you could write what is IMHO the most readable option: Span::new(days=5, hours=8, minutes=1)

I'm all for named parameters. C++ is sorely lacking that feature as well. Currently using vs code with C++, I like how it handles the missing language feature by adding a grayed out parameter name before the value for function calls and initializers. Maybe there is something like that for rust.

Yes, editors can be configured to do the same thing for rust.

Re: Jiff: Datetime library for Rust

#73
post #53

Earlier quoted context omitted.

Not at all. If this library was GPL, any software using it also needs to be GPL. This means all code needs to be open source, which severely limits freedom of makers of end-user software. And almost the whole Rust ecosystem is MIT.

> which severely limits freedom of makers of end-user software And thereby severely guarantees the freedom of said end-users. The freedom to deny the freedom of another person is not a freedom worth discussing. The author expressly dislikes copyright. GPL is still the only real cure to copyright. "Permissive" licences are corporate friendly. They allow corporations to take what they want and give back nothing. In thi…

> The freedom to deny the freedom of another person is not a freedom worth discussing.

If that was true, you wouldn't be doing just that.

Re: Jiff: Datetime library for Rust

#74
post #56

Earlier quoted context omitted.

I haven't tried it (so I'm sorry if it's wrong or not what you're talking about) but can't you get a freestanding days function by use jiff::ToSpan::days;

You cannot import trait methods as free standing functions. I'm not sure if there was a discussion about making this a possibility but it's definitely not something you can do today.

Oh, sorry about that then.

Re: Jiff: Datetime library for Rust

#75
post #68

Earlier quoted context omitted.

The feature is controversial enough that it's basically a wontfix.

Is it really, though? I didn't read all the comments, but the ones I read, very few were opposing the concept as such: https://internals.rust-lang.org/t/pre-rfc-named-arguments/16... However, many were opposing overloading the same pre-rfc was suggesting.

I'm guessing that general support doesn't translate to support for a specific syntax with changes to the calling convention. I wouldn't put money on this coming together any time soon.

Re: Jiff: Datetime library for Rust

#76
post #73

Earlier quoted context omitted.

> which severely limits freedom of makers of end-user software And thereby severely guarantees the freedom of said end-users. The freedom to deny the freedom of another person is not a freedom worth discussing. The author expressly dislikes copyright. GPL is still the only real cure to copyright. "Permissive" licences are corporate friendly. They allow corporations to take what they want and give back nothing. In thi…

> The freedom to deny the freedom of another person is not a freedom worth discussing. If that was true, you wouldn't be doing just that.

So, to be clear, your argument is that the freedom to deny the freedom of other people is a freedom that should be protected? How do you deal with issues like slavery and, in particular, its abolishment?

Re: Jiff: Datetime library for Rust

#77
post #53

Earlier quoted context omitted.

Not at all. If this library was GPL, any software using it also needs to be GPL. This means all code needs to be open source, which severely limits freedom of makers of end-user software. And almost the whole Rust ecosystem is MIT.

> severely limits freedom of makers of end-user software Ironic for a "free" software license. It would be great if there was a license somewhere inbetween GPL and MIT: you'd be required to upstream (or make available) any changes you made to the parts of other people's code you're making use of, but not required to open your entire codebase.

That's LGPL.

Re: Jiff: Datetime library for Rust

#78
IMHO, unwrap() , expect() and company, has infected the Rust language so deeply that one wonders when (and not "if") will a library send a panic and crash the whole program.

How could be erased those panic! methods that are used in most of Rust's libraries is something that may be is beyond the possible? beside is promoted from all the Rust's tutorials and reference code.

So much correctness in the Rust language just for to promote to all the community to crash the program from libraries without handling the error is something I can not understand.

I hope this philosophy do not reach the Linux kernel.

Re: Jiff: Datetime library for Rust

#79
post #53

Earlier quoted context omitted.

Not at all. If this library was GPL, any software using it also needs to be GPL. This means all code needs to be open source, which severely limits freedom of makers of end-user software. And almost the whole Rust ecosystem is MIT.

> severely limits freedom of makers of end-user software Ironic for a "free" software license. It would be great if there was a license somewhere inbetween GPL and MIT: you'd be required to upstream (or make available) any changes you made to the parts of other people's code you're making use of, but not required to open your entire codebase.

MPL or CDPL
Post reply on HN