News for hackers. Stuff that matters.
Re:XSV: A fast CSV command-line toolkit written in Rust by jcelerier on Sunday September 09, 2018 @10:00AM (#17945906)
> So sockets, file system calls, event loops, file configuration & default folders... It's never THAT different but different enough that just compiling your code won't work.

But if you use something like Qt you've got all of this cross-platform out of the box - I have a multiple hundred lines of code C++ software which does all this and much more ; it has almost zero platform-specific stuff except one function at some point to set real-time priorty to threads.

Re:XSV: A fast CSV command-line toolkit written in Rust by burntsushi on Sunday September 09, 2018 @10:04AM (#17945920)
So you think it's appropriate for tools like ripgrep and xsv to bundle a gui toolkit to do its job?

I feel like this whole line of argument is disingenuous. In Rust, you don't need to bundle a GUI toolkit to get cross platform stuff that works. The standard library was built with Windows in mind, and it shows. You don't need any additional POSIX layer. You just use the standard library.

If you go and look at competitors to things like xsv and ripgrep that are written in C or C++, they either require some kind of POSIX thing on Windows to run correctly (like cygwin), or they jump through lots of hoops to behave as a native Windows application.

It really should not be a controversial statement to say that Rust has a better cross platform story (Windows/mac/Linux). It was a design goal.

Re:XSV: A fast CSV command-line toolkit written in Rust by jcelerier on Sunday September 09, 2018 @10:57AM (#17946171)
> So you think it's appropriate for tools like ripgrep and xsv to bundle a gui toolkit to do its job?

Qt is not a GUI toolkit, it's a general framework. If you only link to -lQtCore you won't have anything remotely related to GUI in your binary. For instance doxygen is built like this.

Re:XSV: A fast CSV command-line toolkit written in Rust by burntsushi on Sunday September 09, 2018 @11:43AM (#17946394)
Why isn't this more common then? I've literally never seen this done in any of the C++ command line tools I've looked at.
Re:XSV: A fast CSV command-line toolkit written in Rust by jcelerier on Sunday September 09, 2018 @02:13PM (#17947048)
Re:XSV: A fast CSV command-line toolkit written in Rust by dj43nq on Sunday September 09, 2018 @06:41PM (#17948188)
Don’t you end up with licensing fees if you use QT in a commercial product? Seems like a downside to me.
Re:XSV: A fast CSV command-line toolkit written in Rust by dj43nq on Monday September 10, 2018 @12:46PM (#17953081)
QT seems interesting.

For those like me who’ve never used QT: As long as you don’t statically link the QT libraries you don’t have to open source your entire commercial application. I’m not a lawyer.

General notes about licensing https://www1.qt.io/licensing/

Comparison of licenses https://www1.qt.io/licensing-comparison/

Re:XSV: A fast CSV command-line toolkit written in Rust by jcelerier on Tuesday September 11, 2018 @05:56AM (#17958346)
> As long as you don’t statically link the QT libraries you don’t have to open source your entire commercial application

I provided a link from the FSF that shows that this is not the case just below - you can statically link proprietary apps with LGPL qt.

Re:XSV: A fast CSV command-line toolkit written in Rust by dj43nq on Tuesday September 11, 2018 @09:12PM (#17964818)
“(1) If you statically link against an LGPL'd library, you must also provide your application in an object (not necessarily source) format, so that a user has the opportunity to modify the library and relink the application.”

So for LGPL. As a commercial application developer I’m not sure I’d want to do that. I’d then have to field support requests for that object file.

Still, good to know.

Re:XSV: A fast CSV command-line toolkit written in Rust by jcelerier on Sunday September 09, 2018 @07:07PM (#17948280)
Not at all. You have to respect the license of Qt (e.g. if your customer asks you for the source of the Qt libraries you have to provide them - including any modification you made to them), but you can keep your own app proprietary and ship the whole however you like.
Re:XSV: A fast CSV command-line toolkit written in Rust by detaro on Sunday September 09, 2018 @06:42PM (#17948194)
LGPL isn't that hard to comply with for a desktop application, so no.
Re:XSV: A fast CSV command-line toolkit written in Rust by littlestymaar on Monday September 10, 2018 @03:52AM (#17950127)
With LGPL, you can't statically link the library though. Which requires your user to install it manualy, unless you package your software with some kind of installer (which is not so common on windows for cli executables).
Re:XSV: A fast CSV command-line toolkit written in Rust by jcelerier on Monday September 10, 2018 @05:45AM (#17950559)
> With LGPL, you can't statically link the library though.

no, that's tiresomely false. You can link proprietary code statically with LGPL code. LGPL does not give a shit about static or dynamic libraries because LGPL is not a language-specific license.

Right from the source: https://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynami...

Re:XSV: A fast CSV command-line toolkit written in Rust by littlestymaar on Monday September 10, 2018 @07:24AM (#17950934)
Thanks for the link. The nuance I was missing is that you can distribute statically-linked LGPL library as long as you provide a way for your user to override the chosen library with his own version of the library.
Re:XSV: A fast CSV command-line toolkit written in Rust by detaro on Monday September 10, 2018 @07:17AM (#17950910)
It's very common to ship windows CLI tools as a .zip file with an exe and a bunch of .dlls, that's not exactly burdensome to install compared to only an executable.