News for hackers. Stuff that matters.
Re:Foliate – A simple and modern GTK eBook viewer by JasonFruit on Tuesday July 09, 2019 @10:59AM (#20392414)
Ecosystems are tough. I'd never used meson, so I installed it using apt-get. I tried to build Foliate, and got an error about wrong arguments to `project()`. Searching for the error brought results about a wrong version, so I uninstalled meson and reinstalled it using pip. The installation completed fine. I went to run Foliate (com.github.johnfactotum.Foliate, if that wasn't somehow obvious), and I got an error from GJS (JS ERROR: SyntaxError: invalid property id @ resource:///com/github/johnfactotum/Foliate/js/main.js:57 JS_EvaluateScript() failed).

If it's obvious to anyone else what's wrong here, it's not obvious to me. Isn't one of the advantages of interpreting the code on the target platform supposed to be portability? If so, why is it I so seldom can can get anything written for GJS, or Node, or a Python program not my own, to install and run without a three-hour yak shave?

I'm sure this is a great project, and I mean no disrespect to the author, who did a better job of installation instructions than most — but I'm tired of installation being such a pain. It's almost, but not quite, enough to make a guy run Windows.

Re:Foliate – A simple and modern GTK eBook viewer by jancsika on Tuesday July 09, 2019 @11:26AM (#20392703)
> Searching for the error brought results about a wrong version

One of the bullet points from the Meson website:

> * fun!

So if I understand correctly, this modern build tool created to replace all the extant time-wasting build tools got memorialized in Debian in a half-baked state where it's not compatible with future versions.

Also-- the fact that you had to leave the hardened bank vault of apt through the screen door of pip... to install a thing to build other things to run on your system.

I love it.

> If so, why is it I so seldom can can get anything written for GJS, or Node, or a Python program not my own, to install and run without a three-hour yak shave?

... is the question that explains why Electron exists. Every comment on HN about its size, memory usage, and insecurity doubles as a critique of all the problems you just hit with a Linux system.

Electron: "Memory and disk space is cheap enough, but your time will never be."

Re:Foliate – A simple and modern GTK eBook viewer by nemetroid on Tuesday July 09, 2019 @08:00PM (#20398008)
It's worth mentioning in this context that the thing making Foliate difficult to build and run on older platforms is the fact that it's written in modern Javascript (and therefore needs a modern version of gjs): https://github.com/johnfactotum/foliate/issues/45
Re:Foliate – A simple and modern GTK eBook viewer by JasonFruit on Tuesday July 09, 2019 @01:18PM (#20394217)
I don't like Electron — I've brought some of my problems on myself by my love of using minimally-capable old hardware — but this is by far the best statement of the argument for it I've ever heard.
Re:Foliate – A simple and modern GTK eBook viewer by lpcvoid on Tuesday July 09, 2019 @01:32PM (#20394395)
I propose on building native tools that have all relevant libraries statically linked. Yeah, executable will grow in size, but it's the best of both world : portability, speed and not using javascript.
[dead]
Re:Foliate – A simple and modern GTK eBook viewer by dang on Tuesday July 09, 2019 @09:19PM (#20398394)
Snark isn't ok here and personal attacks will get you banned. Would you mind reviewing https://news.ycombinator.com/newsguidelines.html and sticking to those rules when posting to HN? We'd be grateful.
Re:Foliate – A simple and modern GTK eBook viewer by johnfactotum on Tuesday July 09, 2019 @11:14AM (#20392566)
Hi, author of Foliate here. It sounds like you're using something like Ubuntu 16.04 or similar? Foliate currently requires GJS >= 1.52 and Meson >= 0.40.

There's an open issue here on supporting older systems: https://github.com/johnfactotum/foliate/issues/45

Re:Foliate – A simple and modern GTK eBook viewer by JasonFruit on Tuesday July 09, 2019 @12:52PM (#20393840)
I'm using Debian 9.8 Stretch, released in February.
Re:Foliate – A simple and modern GTK eBook viewer by WhatIsDukkha on Tuesday July 09, 2019 @02:08PM (#20394849)
Hi,

I've using Linux as my primary desktop at work and home for going on 25 years.

If you want to use newer software you should pick a distribution that is geared for that.

Debian stable is for people that DON'T want new software or even to try new software.

You are at odds with your choices.

Either switch to Testing, Unstable or pick an Ubuntu strategy ie Long term or every 6 months.

Of these choices Ubuntu is actually more conservative then Testing or Unstable as it walks forward in a predictable time based manner.

Good luck.

Re:Foliate – A simple and modern GTK eBook viewer by JasonFruit on Tuesday July 09, 2019 @02:48PM (#20395275)
That's one perspective, and it has merit. Others tell me, "You should use a stable release and build software you need from scratch — that way, you get the best of both worlds!" In either case, it seems like writing new software using bleeding-edge versions of libraries and tools is not really necessary; if you hang back a couple releases, it makes matters much easier. Backward compatibility is much easier to achieve than forward.

(I don't have enough experience with GJS and WebkitGtk to know if slightly older versions would have been workable here, though I believe that approach to be valid in most cases.)

Re:Foliate – A simple and modern GTK eBook viewer by WhatIsDukkha on Tuesday July 09, 2019 @04:43PM (#20396374)
A library from 1 to 6 to 18 months ago is not "bleeding edge" in any way shape or form.

You are making software reactionary arguments for people doing a lot of work to support you touristing their software from an ancient, long out of date software distribution (which is what people that use Debian Stable want).

If you are going to make bug reports or even comments you really would be better to state you are on Debian Stable from the beginning, it's actually rude to make people think you are on a reasonably supportable distro without warning.

Flatpak is probably your best choice to encourage people to be even able to support your distribution choice going forward. The sandbox also has some attendant benefits that will bear more fruit in the future.

Re:Foliate – A simple and modern GTK eBook viewer by nemetroid on Tuesday July 09, 2019 @08:08PM (#20398057)
> In either case, it seems like writing new software using bleeding-edge versions of libraries and tools is not really necessary; if you hang back a couple releases, it makes matters much easier.

I believe this is precisely what Foliate does. It depends on meson 0.40 (released Apr 2017) and gjs 0.52 (released Mar 2018). Sixteen months old dependencies can hardly be considered bleeding-edge.

Re:Foliate – A simple and modern GTK eBook viewer by JasonFruit on Tuesday July 09, 2019 @08:24PM (#20398132)
You are clearly right, and I assumed wrongly.
Re:Foliate – A simple and modern GTK eBook viewer by jhasse on Tuesday July 09, 2019 @01:22PM (#20394275)
> released in February.

Yeah, that's not how Debian stable works.

Re:Foliate – A simple and modern GTK eBook viewer by JasonFruit on Tuesday July 09, 2019 @01:31PM (#20394387)
It's when the point release was done[0]. Obviously not everything was new then. I'm assuming most people who package applications for Linux have an understanding of how Debian works.

[0]: https://www.debian.org/News/2019/20190216

Re:Foliate – A simple and modern GTK eBook viewer by jhasse on Tuesday July 09, 2019 @01:38PM (#20394485)
> Obviously not everything was new then.

Nothing was! Debian stable doesn't update packages (not even minor releases or bugfixes). They only backport security fixes or very critical bugfixes.

Debian 9 was freezed on 2017-02-05. You'll have the version of every package from this date, point release don't change that.

Re:Foliate – A simple and modern GTK eBook viewer by JasonFruit on Tuesday July 09, 2019 @01:53PM (#20394668)
We're not disagreeing — please stop trying to raise an argument where there is none!

My only reason for giving the point release date was to say that it's a supported release. You're reading a lot more into my tiny comment than I ever put into it.

Re:Foliate – A simple and modern GTK eBook viewer by nemetroid on Tuesday July 09, 2019 @08:11PM (#20398072)
> it's a supported release.

Calling it "supported" in the context of the ability to build arbitrary software is misleading. It's supported by Debian for the particular packages included in Debian's package repositories - nothing less, nothing more.

Re:Foliate – A simple and modern GTK eBook viewer by knocte on Tuesday July 09, 2019 @12:29PM (#20393524)
why don't you make a configure script that detects and warns about these requirements?
Re:Foliate – A simple and modern GTK eBook viewer by jgillich on Tuesday July 09, 2019 @11:07AM (#20392485)
Re:Foliate – A simple and modern GTK eBook viewer by JasonFruit on Tuesday July 09, 2019 @01:04PM (#20394032)
Yes, I finally installed it via Flatpak. What a fun adventure! First, I had to install Flatpak with apt. Then, I downloaded the Foliate .flatpakref. I installed it with `flatpack install com.github.johnfactotum.Foliate.flatpakref`, which worked the first time!

No, it didn't. Of course, Flatpak let me know that my user account didn't have the ability to configure the remote repositories the Foliate flatpakref specified. I could have searched for the right way to do it, but installing as root seemed to work, and it runs fine as a regular user, too!

But, of course, it doesn't. It doesn't have the ability to open files from most folders. I see by searching that you set sandbox permissions in an application manifest file, but I'm not sure I'm that attached to doing any more of this.

Re:Foliate – A simple and modern GTK eBook viewer by lordfrikk on Thursday July 11, 2019 @04:03AM (#20409892)
Installing it via "flatpak install foliate" didn't work? Downloading the .flatpakref seems like an unnecessary step to me but I'm on a different distro (openSUSE Tumbleweed).

edit: I can also open files from anywhere on my PC. Could it be that the flatpak on Debian Stretch is not correctly configured?

Re:Foliate – A simple and modern GTK eBook viewer by JasonFruit on Friday July 12, 2019 @11:24AM (#20421363)
I'm pretty sure your edit nails it: flatpak on my moldy Debian doesn't work correctly as a non-root user, and the alternative of running it as root and then running the application as a normal user was neither intended nor foreseen.

I did finally install Debian testing, and it looks like the flatpak problems are resolved, but I decided not to bother installing foliate because of the nearly 700MB of dependencies it wanted over my rural satellite connection. C'est la vie.

Re:Foliate – A simple and modern GTK eBook viewer by JasonFruit on Friday July 12, 2019 @02:00PM (#20422859)
I went ahead and burned the data: for Science! After the dependencies were all downloaded, it works correctly and completely. It's a fairly nice ebook reader application, and it only took three days and replacing my operating system to get it.
Re:Foliate – A simple and modern GTK eBook viewer by matthewbauer on Tuesday July 09, 2019 @11:11AM (#20392529)
But then you can't make changes to the app! You're stuck with a read-only copy.
Re:Foliate – A simple and modern GTK eBook viewer by johnfactotum on Tuesday July 09, 2019 @11:17AM (#20392606)
You can build your own Flatpaks from source, too. In fact that's probably how a lot of development is done these days around GNOME and its wider community when using Gnome Builder. You make a change, and Gnome Builder builds a Flatpak and runs it for you so you can test it.
Re:Foliate – A simple and modern GTK eBook viewer by z3t4 on Tuesday July 09, 2019 @06:14PM (#20397216)
After cloning the project, all you should have to do is to ./src/main.js and the shebang should take care of the rest (running gjs, node, python etc).

Why complicate things? build-steps are the root of all evil.