1. 1

    Wouldn’t it be better to copy bookmarks.ini to your Nextcloud, and then symlink it to ~/.config/lagrange/? This would also sync saved feeds and custom icons, and remove the need to re-export every time you add a bookmark.

    1. 1

      trash-d: A near drop-in replacement for rm that uses the trash bin

      also

      Windows won’t work at all, and MacOS probably won’t either. There are no plans for support of either platform.

      Maybe not so drop-in after all…

      Not a big fan of Node but maybe https://github.com/sindresorhus/trash could be used as an inspiration. Ironically, sindresorhus/trash states that their Linux support is not that good.

      1. 3

        I intentionally chose to only support platforms conforming to the FreeDesktop trash specification since that covered all the systems that I personally cared about (I don’t own a Mac or use rm on Windows).

        I should really update the README though, since I am totally open to supporting those platforms, if it can be done in a way that doesn’t cause other problems.

        Also I hadn’t heard of sindresorhus/trash, thanks for sharing it! Their platform-specific tools could be very enlightening.

        EDIT: I updated the README to reflect my opinion on MacOS and Windows support better, along with some other information and links to similar projects like the one above.

      1. 6

        Quite nice! I love little tools like this; I’ve had trash-cli aliased to rm for a long time and never regretted it.

        1. 9

          A big motivation for this project was that I wanted something like trash-cli but that was a single static binary instead of a larger Python application (nothing wrong with Python, I just like static binaries).

          Also I wanted to actually mirror the semantics of rm as much as possible, since trash-put does not and it is not recommended that you alias it.

          1. 3

            I package trash-cli for Debian. Someone in the debian community once showed me some esoteric invocation of some existing xdg tools (that we almost certainly have installed) that did almost everything trash-cli does, but missed something crucial (probably restore, haha). I wish I could remember what it was.

            1. 5

              My original plan for this project was more or less that; patching together various standard commands using Bash. But this got clunky very quickly so I gave up on writing it in Bash and switched to D.

            2. 1

              A big motivation for this project was that I wanted something like trash-cli but that was a single static binary instead of a larger Python application (nothing wrong with Python, I just like static binaries).

              You can probably compile trash-cli into a static binary using Nuitka and its --onefile option assuming all the dependencies play nicely. If you run Nuitka within a conda environment you can get all the C dependencies statically compiled in, too. There are downsides to doing this, like the binary can get pretty large and compile times can be multiple minutes. I am still happy you made this project, though.

          1. 3

            I don’t know of any software for this, but I think this is a great idea. Universities would probably also love something like this.

            1. 1

              I just finished Circe by Madeline Miller, which had been on my list for a while.

              Was a very interesting book, and offered a very different take on the usual Greek tales of gods and heros. Though it’s probably best if you read The Odyssey beforehand, I feel like I missed a fair bit of context since I didn’t.

              Overall though I quite liked it.

              1. 19

                Forgive me if this is gauche, but what is wrong with simply using bashisms? Outside of embedded contexts, where you want everything in Busybox, but writing shell scripts in just POSIX shell just seems like a tortured dialect.. The extensions are legitimately useful, so it’s also a question of why other shells haven’t implemented it.

                Also curious is not wanting to use Shellcheck, even if it’s just for (skippable) CI-side tests. Shellcheck was the first tool that made writing shell scripts tolerable for me.

                1. 4

                  Some POSIX operating systems don’t come with Bash out of the box, notably the BSDs. As such Bash is rarely used in them even if it is available. Even MacOS switched its default shell to ZSH.

                  Generally though I think dropping the dependency on Bash increases compatibility across the board and removes an unneeded dependency. Both of which are always welcome.

                  1. 3

                    I don’t mind taking dependencies if it helps you reduce complexity elsewhere, especially if the cost is amortized elsewhere.

                    1. 4

                      You’re not the one maintaining thousands of rc scripts or build scripts for a distro/flavor. Or at least I assume you’re not. The tradeoffs communities make usually have a reason and just because you don’t see it or understand it doesn’t mean it’s not there.

                      1. 3

                        But this is not about thousands of rc scripts. This issue is about one script used during the go build process. On majority of systems it will need a dependency that is immediately satisfied. On some minority it will require a single package.

                        1. 4

                          The GitHub issue appears to be a troll issue, and I agree it doesn’t really matter much in the context of the Golang toolchain. However I was responding to the thread which was speaking more generically about dependencies and script maintenance.

                          1. 3

                            Well technically at least 3.

                            But I agree in general. I fail to see why requiring bash is such a huge deal (I have read the comments here as well as the comments on the GitHub issue).

                      2. 2

                        Even MacOS switched its default shell to ZSH.

                        For a while, not any more.

                        1. 1

                          What is it now?

                          1. 1

                            I’m fairly sure it’s back to bash.

                      3. 3

                        One of the comments from that issue:

                        Just had my first experience with Go, which was nice. The one thing that surprised me a little bit was that bash was required to build. On OpenBSD the standard shell is a hardened ksh. bash is avoided everywhere in base so I had to install that, no biggie, but the question I would phrase in the spirit of portability and reducing dependencies is “why require more if technically all you need is POSIX shell”? I’m wondering if such a change would be desirable, aside from the question who’s going to make it happen.

                        Also, doesn’t macOS uses zsh by default now? But probably, it’ll be compatible with the bash scripts used here?

                        1. 3

                          It seems like just another dependency to me though - and certainly one common enough most people will have, and run on most people’s systems.

                          1. 3

                            doesn’t macOS uses zsh by default now?

                            Yes, but they’re not removing bash from the standard system AFAIK

                            1. 2

                              Yes, that comment is from me. It is my first encounter with the Go community, so after discovering they don’t completely dismiss the idea itself, I thought let’s first get some broader opinions and have a discussion with a community I’m part of before I continue this discussion in the Go thread.

                              Also, doesn’t macOS uses zsh by default now?

                              idd

                              But probably, it’ll be compatible with the bash scripts used here?

                              Good question, from a superquick check I can say it doesn’t right out fail like it does on OpenBSD with ksh.

                            2. 2

                              Forgive me if this is gauche, but what is wrong with simply using bashisms?

                              Nothing, bash really makes our lives easier, the extensions are really useful. Some people wants to only use POSIX sh, just because it is a “standard”. Some people just hates bash because it is popular.

                            1. 4

                              Just the thought of sending Forth code via HAM radio is amazing. The raw ingenuity of the old-school hackers always astounds me.

                              On the subject of patents I think this is example is not a localized occurence. In technology the innovators are not always those with money for R&D, but the opposite; Those who are constained to their limited resources so must get creative. I think for nearly every technology patent there was some hacker 10 years prior who did it because they needed to, and didn’t tell anyone. This goes triply so for software patents (evil as they are).

                              This also has interesting timing since I’ve been learning Forth recently. The community has done some very interesting things due to the incredibly simple nature of the language. CollapseOS and GBForth come to mind.

                              1. 24

                                I can appreciate the sentiment of this article, but it does border on encouraging incompetence. I know people who really treasure that they’ve always been “nerds” and “into computers and programming”, but were actually very ineffective. But, I’ve seen the other way too, where people clearly are just interested in trying to skate by with an easy gig, minimal effort, no extra effort at learning new things or gaining useful skills unless required.

                                I feel like hard work, competence, and initiative is all that is expected. These are hard to define in practical steps, but easy to spot when you see it.

                                1. 10

                                  I agree. Imposter syndrome is very real, and I understand that many people don’t want to be the stereotypical nerd-cliche programmer or a math-major computer scientist. It’s a wide field and there’s room for everyone.

                                  But the author of this article even goes so far as to say they do not understand functions of their job, or things that they have been shown how to do repeatedly. Which is honestly not something I feel you should be telling everyone on your blog.

                                1. 35

                                  I guess I’ll be the one to say it… Learn a LISP. Doesn’t matter which one, though I would recommend Clojure.

                                  If you want to get away from the C-style imperative programming, LISP is quite far away. But it contains many ideas that C-style languages have been trying to emulate for decades with mixed success. I think that this footnote in the Structure and Interpretation of Computer Programming (chapter 3 #27) explains what is meaningful about LISP and the LISP way of doing things more succinctly than any other explanation I have seen (funny that it’s just a footnote).

                                  For Clojure itself there is a good number of resources, many of which listed here. The first on that list Clojure Distilled provides a great introduction to the language, and Clojure for the Brave and True provides a much fuller guide.

                                  However I am cheating a little, since most LISPs including Clojure are dynamically typed, and I initially considered this a weak point of the language. However it is my opinion that they LISP syntax and methodology provide the best experience of dynamically typed programming there is, and Clojure provides many facilities such as pre/post conditions, spec, and TypedClojure.

                                  1. 5

                                    Lisp is a good suggestion, despite not fitting all the criteria. I personally would recommend going for either Common Lisp (SBCL) or Scheme (Racket) to start with though. Clojure for the Brave and True isn’t a bad book, but I think that A Gentle Introduction to Symbolic Computation or The Little Schemer followed by SICP provides a much nicer path for a beginner, and then if one feels that switching to Clojure would be advantageous they can do so after the fact.

                                    Obviously this is just personal opinion, but that’s my experience (I don’t use Clojure much though, and started to learn it after experience with both Common Lisp and Scheme).

                                    1. 3

                                      This Introduction to Clojure was posted a year ago and was a really good (relatively) short-form induction for me.

                                      1. 2

                                        Any reason for recommending Clojure over more traditional suggestions CL or Scheme (including concrete implementations)?

                                      1. 9

                                        I read this whole article just waiting for the HTML Meter Element to be mentioned as a much simpler alternative, but it never was.

                                        Semantic HTML is powerful, the wheel doesn’t always need to be re-invented with SVG.

                                        1. 7

                                          Thanks to you, I know of HTML Meter Element now :).

                                          1. 3

                                            I love it - I don’t know why I always forget about . Thanks for the reminder!

                                            I definitely agree that reinventing the wheel for its own sake is wrong. I meant for this post to be more a teaching experience of “how would I go about creating a component like this”. There are lots of tidbits that I’ve had to learn on my own, and was hoping to share - like drawing with SVG in React and using d3 scales. I wonder what I could do to reinforce that point.

                                          1. 4

                                            Is it only me, or isn’t the concept of an article discussing the power of lisp without mentioning macros a bit weird?

                                            1. 12

                                              I thought the opposite when I read it. This article shows just how powerful LISP is without its most powerful feature. And it’s good as an introduction to the power of LISP since macros can be hard to understand immediately, meanwhile this code is built up from very basic pieces into something very powerful.

                                              1. 2

                                                If you read R4RS (only 50 pages IIRC), it gives how derived expressions can be expressed in terms of primitive expressions (lit, var, call, lambda, if, set!). Such is what scheme’s claim of elegance and power. Macros are in the appendix of R4RS.

                                                1. 2

                                                  Macros are a detail. Most of the trick lies in the first-class syntax for working with ASTs playing well together with eval.

                                                  Racket is not using traditional macros, but rather another higher-level abstraction, but the concise syntax makes it great anyway.

                                                1. 13

                                                  The only officially supported installation method for Discord on Linux is the .deb and .tar.gz files they provide. Any other installation method, including both the Flatpak and Snap, is unofficial and not supported by Discord.

                                                  1. 3

                                                    There’s a difference between only officially supporting one installation method, and designing your software to undermine the other installation methods even when they have been chosen. Especially when said other installation methods add security measures for users’ privacy.

                                                    1. 9

                                                      designing your software to undermine the other installation methods even when they have been chosen

                                                      “Designing to undermine”, in my opinion, is absolutely not what’s happening here. They try and make updates less painful through their admittedly kind-of-clunky official distribution channels.

                                                      To avoid doing that when it’s installed through another method, they’d have to maintain an built-in check for these non-official distribution channels.

                                                  1. 5

                                                    Given that TBL sold out the Web standards process to rubber-stamp a DRM API, I’d need a lot of convincing before I entrusted my personal data to something he created. Having Schneier on board is an encouraging sign, however.

                                                    1. 1

                                                      I disagree that was selling out, and it might have been the best choice in that situation. DRM on the internet was already happening using things like Silverlight, and it was showing no signs of stopping anytime soon. By standardizing DRM onto one implementation it kept the industry fro fracturing into multiple conflicting solutions, and allowed browser vendors to build it in. Standardizing DRM even brought previously unavailable content to more platforms.

                                                      TL;DR: DRM is bad, but by standardizing it the damage it causes was reduced.

                                                      1. 2

                                                        That is a misconception, because only the EME was standardised, not the CDMs as well. Take Widevine as an example - it uses the EME standard, but is only available for certain platforms, and to certain vendors.

                                                        For an example of how this works in reality: https://www.theregister.co.uk/2019/04/03/googles_widevine_drm/

                                                        There is no upside to having a standardised interface to DRM, only downsides. (Actually there might be one; I’ve been told that EME has better accessibility affordances than its predecessors.)

                                                        1. 2

                                                          It might have been, but I doubt it. It’s the first standard that was pushed through by W3C despite such strong objections. For me, it broke the standards setting method that W3C had done and also introduced non-open standards.

                                                          I’m not sure it’s better than silver light. I do know that if the best one can say is “maybe it was the best we could do,” then that’s rough. But to me, it seems not accurate as looking through the discussion and deliberation there were many other options that weren’t explored or tested. We do know that this is the best that lots of huge tech company lobbyists supported.

                                                      1. 6

                                                        So it overtook Clojure and Scala (each around 2.5%) to become second (at around 5%), but was this at the expense of Java marketshare, or at the expense of other languages?

                                                        1. 7

                                                          If I had to guess I would say at the expense of Java. Android currently only officially supports Java and Kotlin, so I would imagine a fair number of Android developers are making the switch to Kotlin from Java.

                                                          1. 6

                                                            I’d say that in absolute terms most Kotlin users came from Java, but in relative terms Kotlin completely crippled Scala adoption.

                                                            The amount of new people learning Scala fell dramatically from what I see, and many Scala shops have already changed into Scala-and-Kotlin shops or even Kotlin-and-Scala shops.

                                                            I think there is no way of Scala recovering from Kotlin’s winning adoption strategy, even if Oracle deprecated Java tomorrow and force-installed Scala with every JRE/JDK download.

                                                            1. 2

                                                              Kotlin’s winning adoption strategy

                                                              What is this? The winning adoption strategy? (Other than get crowned by Google - that’s a pretty winning situation)

                                                              1. 5

                                                                Beating Scala at the things it is bad at, not trying to beat it at the things it excels.

                                                                1. 2

                                                                  Would you say a big part of this is just being closer to Java overall and not introducing nearly as many wildly diverging concepts?

                                                                  1. 4

                                                                    I wouldn’t say so. The language itself simply doesn’t matter. It’s a matter of selling it appropriately, something Jetbrains is really good at, and something Scala never cared about.

                                                                    Has Scala gone overboard on some things? Sure.

                                                                    Is it’s transgression so big that – from a technical POV – a second language which shares 80% of the language surface that matters, and goes overboard on a different 15%, should exist?

                                                                    If not, then why is Kotlin successful?

                                                                    What Kotlin did was taking a hard look at all the stuff were Scala was terrible¹, and realized that there was a way larger group of people who cared about existing documentation and a working IDE than there will ever people who care about playing Prolog at the type-level.

                                                                    Jetbrains told the former group the things they wanted to hear (and Scala never bothered) and is wildly successful with that strategy.


                                                                    ¹ There is a reason why people who tried to improve the IDE, the website, the documentation, etc. all quit on extremely bad terms with Scala leadership.

                                                            2. 6

                                                              With two different explanations, I decided to dig for the 2018 survey results.

                                                              Year    Java Clojure  Kotlin  Groovy   Scala   Other
                                                              2018    90.0     3.0     2.4     2.4     1.8     0.6
                                                              2019    86.9     2.9     5.5     1.5     2.6     0.6
                                                              
                                                              1. 6

                                                                It also might be interesting to compare absolute numbers instead of percentages.

                                                            1. 5

                                                              I never knew Nim had such an extensive standard library. This has encouraged me to check out Nim after putting it off for a while.

                                                              1. 2

                                                                Well this is a wonderful coincidence, I was just telling a friend about Guix yesterday and how I would love to use it when it was stable. And lo-and-behold now it is!

                                                                1. 7

                                                                  While I question the rigor of their study (3 people is not statistically significant) I am glad to see that someone is at least attempting to answer this question. I’ve wondered for years whether or not a second monitor is really necessary, or if just efficient use of screen space (with say a tiling WM) is better.

                                                                  Everywhere I’ve worked has provided us with 2 monitors, but at home I only use one due to having a small desk. And for the life of me I couldn’t tell you which one I prefer.

                                                                  1. 3

                                                                    Can’t load the site, but I found two physical monitors reduced the mental overhead of deciding what goes where, remembering where is hidden some window, etc. I didn’t make particularly efficient use of the second monitor, but it didn’t cost me anything.

                                                                    1. 1

                                                                      Using a tiling window manager has completely solved those problems for me. It’s also completely portable, my workflow/window management does not change whether I am on my work system, home desktop, or laptop.

                                                                  1. 5

                                                                    The marketing for this project is disingenuous.

                                                                    Unlike many other torrent clients that are primarially a desktop client and happen to have a web-ui (Deluge, Qbittorrent, Transmission, etc) Tornado is first and foremost a web client perfect for seedboxes, homelabs, and other scenarios where the user and the machine are in different locations.

                                                                    Tornado is a Transmission frontend, the very thing it claims not to be. It’s not a bittorrent client.

                                                                    Disclaimer: I’m involved in the synapse project.

                                                                    1. 1

                                                                      While it is true that Tornado is a frontend to Transmission and not it’s own client (for now) that quotation was intended to illustrate the difference in priorities of the different projects. Transmission supports multiple different interfaces simultaneously including the Web, while Tornado focuses completely on the Web and provides features outside of just downloading torrents.

                                                                      Though I do admit that the phrasing “bittorrent client” might imply things that it is not.

                                                                      Also I had not heard of the Synapse project, it seems very interesting. Is it possible to use as a library or only though RPC?

                                                                      1. 4

                                                                        But Tornado is something fundamentally different from Transmission. The comparison isn’t meaningful. It also comes across as dishonest, because a project like Tornado is X amount of work whereas something like Transmission is X-squared. Putting yourself out as better than these projects isn’t cool. Tornado isn’t a bittorrent client and it’s no different from any of the existing approaches. It’s cool to have a nice Transmission frontend but dispense with the dishonest better-than-thou marketing.

                                                                        Is it possible to use as a library or only though RPC?

                                                                        Only through RPC.