1. 3

    I would love something akin to qalc in Rust. Do you have anything like that planned? I’d like to be able to do stuff like “20% + 100” and “200 USD to EUR”.

    1. 3

      https://github.com/tiffany352/rink-rs Unit conversion tool and library written in rust

    1. 2

      https://github.com/jedmao/eclint
      Validate or fix code that doesn’t adhere to EditorConfig settings or infer settings from existing code

      1. 5

        Seems to be catching on, comparing to the last time it was discussed: http://editorconfig.org/

        There are now 22 editors bundling .editorconfig support, including VisualStudio and Kakoune, as compared to 7 last time around.

          1. 3

            The resistance to have it enabled by default kind-of defeats the point of including it in the standard Vim runtime files, IMHO. Installing a plugin is just as much effort as enabling a default one (one line) and the downside of shipping it by default is that VIm’s development practices are … somewhat annoying.

            I understand some of the objections, but I abandoned the discussion and that issue after someone became far too toxic (I opened that issue). I don’t feel like dealing what that shit.

          1. 3

            I prefer pre-made styles when there’s a good one available: https://userstyles.org/styles/136068/neo-dark-lobsters

            1. 1

              userstyles was found to be malicious wasn’t it?

              1. 3

                The company that bought userstyles.org and Stylish is shady, yes, but if you’re implying they’re tampering with style downloads, I’ve never heard this. Stylus was forked form Stylish shortly after the acquisition.

                UserCSS is becoming increasingly popular, and almost half of my installed styles are installed straight from their Git repos, eg.:
                https://gitlab.com/maxigaz/gitlab-dark#install-with-stylus

                See also https://openusercss.org/.

                1. 3

                  Thanks for this (and to @rain1); I’ve documented this on the about page.

                  1. 1

                    Stylus still uses the userstyles site though, and the devs were hostile went i asked about this. It’s suspicious.

                    UserCSS looks like it might better, thanks for the rec.

                    it is also possible to do your own custom themes in dark reader, less convenient than extensions designed for that but just letting people know.

              2. 1

                See also Dark Background and Light Text for Firefox. Works on mobile, too. I edit the background color to be #000000 across the web.

              1. 2

                Also, several applications only support HTTP/2 over HTTPS. From a security point of view, this is great. However, it complicates development and debugging inside secure networks that don’t need or want TLS between different components. It means you need to manage a CA and certificates for localhost for local development, log session secrets in order to inspect HTTP/2 requests with Wireshark or similar tools, and may require additional compute resources for encryption.

                Browser shouldn’t require a certificate for localhost as localhost is considered a Secure Context

                1. 4

                  https://mkcert.dev
                  A simple zero-config tool to make locally trusted development certificates with any names you’d like.

                1. 1

                  Looks like it was deleted.

                  1. 1

                    the “cached” version still works

                    1. 1

                      Google

                      1. That’s an error.

                      The requested URL /search?q=cache:VmhUzso1ghQJ:https://twitter.com/DroidAlexandra/status/1119207230782550017+&cd=1&hl=en&ct=clnk&gl=us was not found on this server. That’s all we know.

                      :(

                  1. 5

                    For a second I thought it supported the new prefers-color-scheme: dark media query. Unfortunately, it does not. The page uses some JS to switch between the dark and light themes instead of letting the browser handle it. :(

                    It is only supported on Firefox and Safari right now though, so that’s understandable.

                    1. 2

                      I think you mean “Chrome and Safari”?

                      1. 3

                        MDN says Firefox and Safari but it might be out of date? If you know that Chrome supports this, you might want to update that page.

                          1. 1

                            Did you actually test this in Chrome? Because I did (on MacOS), and neither the latest stable version of Chrome nor the latest nightly Canary build seems to work with prefers-color-scheme. I don’t claim to understand the intricacies of this Chromium bug report or when we can expect the functionality to appear in Chrome, but it doesn’t seem to be there yet.

                            My testing shows that the situation is as currently stated on https://caniuse.com/#search=prefers-color-scheme. Stable Firefox doesn’t work, but latest nightly does. Current version of Safari works.

                            https://bugs.chromium.org/p/chromium/issues/detail?id=889087 might be a more informative bug, it’s the one caniuse is tracking.

                            1. 2

                              You’re absolutely right. The bug I pasted is to do with the theme of Chrome itself. Mistakenly thought it covered prefers-color-scheme as well.

                      2. 1

                        Open an issue or submit a pull request! :-)

                      1. 6

                        Author here. I’m here to answer any question regarding features or implementation.

                        1. 1

                          Thank you for putting this in AUR and making it easier for Arch folks to install! I was trying to use it with the shell companion example in the readme, and it as really slow indexing(?) things and displaying them. (e.g. sometimes 1-2 seconds per keystroke). I use zsh as my shell, and the disk is a really fast nvme.

                          1. 3

                            Actually the AUR package was made by me after finding the project through this post. :p

                            1. 1

                              Ah, well thank you! (Sorry I missed that, I didn’t look too closely to see who submitted it!)

                          2. -1

                            So, why did you name your program dick? It makes me nervous about using it.

                            1. 1

                              Well… One has to have some fun… That was by far the proposal which got most votes when I proposed it on my chat where most users are French speaking…

                              But I’ll remove the “pronounced b-root” part and let people pronounce it as they feel it.

                              1. 1

                                broute though means browse, so it seemed quite fitting. I didn’t even think of the old fashioned “biroute” when I read “broot”.

                                1. 1

                                  Well, the author edited it out of the Readme, and the command line help too. A Good Thing, because it’s a cool project.😎

                            1. 4

                              There’s a nice gallery for light Emacs themes here: https://pawelbx.github.io/emacs-theme-gallery/ (my goto light theme is whiteboard as its the first one I stumbled upon and is also preinstalled).

                              On Vim, I liked using the light version of Gruvbox https://github.com/morhetz/gruvbox. Tried solarized light but it didn’t stick with me - felt like there wasn’t enough contrast IMO.

                              1. 2

                                I’ve been using Gruvbox for over 3 years now. Wish the author would find some time for it, and/or add a maintainer or two. ^^

                                Started out with Molokai, and then Solarized. Any Solarized users should give Gruvbox a look.

                              1. 11

                                The real question is why browsers don’t build this in as a default feature. Slide it into the developer tools, we can ALREADY change css in there we just can’t save it for next time.

                                1. 7

                                  You can do this in Firefox by creating chrome/userContent.css in your profile. http://kb.mozillazine.org/UserContent.css

                                  1. 5

                                    Safari supports this too (and has for at least a decade). Just pick the style sheet you want in Preferences… → Advanced.

                                    1. 3

                                      I always found that not to be user friendly though. Step 1: google where that file is stored. Step 2: Hunt for it. Then, all the features Stylish has like importing/exporting for different sites, toggle the custom styles with a couple clicks, etc, is missing.

                                      1. 1

                                        Thank you for posting this! I was a longtime Stylish/Stylus user but now I’m just going to use the built-in thing.

                                        Two stumbling blocks I ran into when I was trying to get this set up:

                                        1. I had to visit about:config and set layout.css.moz-document.content.enabled to true.
                                        2. Apparently userContent.css cannot be a symlink. (This is weird, since the userChrome.css file in the same directory is allowed to be a symlink.)
                                        1. 1

                                          I always found that not to be user friendly though. Step 1: google where that file is stored. Step 2: Hunt for it. Step 3: Write the code, and do 5-6 save code/restart-the-browser cycles to figure out why it’s not working.

                                          Then, all the features Stylish has like importing/exporting for different sites, toggle the custom styles with a couple clicks, etc, is missing.

                                          1. 1

                                            That is only useful if you want the same styles on every single website.

                                            1. 2

                                              The same stylesheet is used on every website, yes, but you can use a (currently Mozilla-specific) selector to apply certain styles to certain sites:

                                              @-moz-document url-prefix(https://johndoe.example/blog) {
                                                  div.post {
                                                      max-width: 800px;
                                                  }
                                              }
                                              
                                              @-moz-document domain(washingtonpost.com) {
                                                  p.interstitial-link {
                                                      display: none;
                                                  }
                                              }
                                              

                                              There’s more documentation of @document/@-moz-document on MDN.

                                          1. 7

                                            Question for the group. If you use Stylus (or used to use Stylish), what do you use it for?

                                            I headed over the the userstyles.org site and most of the styles seem to be “dark themes” or other cosmetic changes like changing the background of a site. Are there more practical uses of the extension? Can it modify HTML or Javascript (where the real power would be), or is it CSS only?

                                            1. 27

                                              other cosmetic changes like changing the background of a site

                                              You call it cosmetic changes, other people call it accessibility.

                                              1. 7

                                                I use it to tweak the layout of some of the sites I use, like moving a fixed top navbar to the side, and making it smaller. Or making narrow columns wider. Small stuff like that, which make the browsing experience much more bearable. I rarely use the social or sharing aspects of it. I haven’t found anything useful there, and I’m not sharing my tweaks either, because they’re very personal anyway.

                                                I rarely use it to hide things, my adblocker can do that more conveniently indeed.

                                                1. 6

                                                  I apply a style of body { max-width: 800px; } on a few blogs that weren’t designed with wide browser windows in mind—they spill text across the entire width of the screen, which makes them really hard to read. (You could use your browser’s “reading mode” to fix this, too, but this CSS change usually does the job without breaking any layouts.)

                                                  1. 4

                                                    Now that I’ve started using Dark Reader, I use Stylus for well-made, site-specific dark themes. Previously I was using the Gruvbox Dark Everywhere userstyle, but its shotgun approach leaves much to be desired. Beware: Dark Reader has some major performance issues on Firefox.

                                                    Edit: My installed themes (which I enable along with Dark Reader after sunset): https://ptpb.pw/nUrG.png

                                                    Edit 2: Also I enable the Firefox and Tree Style Tabs dark themes. This really needs to get more streamlined.

                                                    Edit 3: And then I get to enable dark/night mode on sites that support it natively, one-by-one as I visit them. Sigh.

                                                    1. 2

                                                      Man, Dark Reader is great. Thanks for bringing my attention to that.

                                                      1. 1

                                                        Funny that you mention this. I don’t often long for the days when I had a CSS styling addon installed, but exactly this Dark Reader page made me bob my head back 20cm. That page seems to be made for a mobile phone or tablet screen, not a 27” monitor. Wow.

                                                      2. 3

                                                        Fixing fonts on the most obnoxious websites.

                                                        1. 3

                                                          I like to use it to remove ads in core apps I use. I’d like to share the styles I create with others who use those apps. I use the free version of toggl, and they have a persistent, animated thing in the bottom-right corner that tells me the benefits of “going pro”. I just made a stylish thing to display: none the element which matches that rule. It’s great.

                                                          1. 1

                                                            Is there an advantage to that over the “block element” feature that exist in most ad blockers?

                                                            1. 1

                                                              I use brave and Firefox which have some built in blocking. I haven’t thought of that, but I’ll take a look!

                                                          2. 3

                                                            I used to use Stylish - and a predecessor the name of which has slipped my mind - to reduce the size of the UI in Firefox - smaller tabs, less wasted space -> more space for page content.

                                                            1. 2

                                                              i’m considering using it to shrink the gmail sidebar label font - they recently increased it from the same size as email body text to a size bigger, and it’s very annoying.

                                                              1. 1

                                                                I sometimes use it to tweak interfaces, like get rid of annoying panels or adding bold to certain elements

                                                                1. 1

                                                                  I just started using this again after forgetting that it existed. Another forum I visit regularly now is ad free and doesn’t waste a bunch of whitespace where these were removed. I created an ironic one for hiding the ads for stylish for android on userstyles.org… :D Also, my day job involves using a console that has a lot of useless (to me) menu items - bye bye.

                                                                  1. 1

                                                                    Can it modify HTML or Javascript (where the real power would be), or is it CSS only?

                                                                    Is it possible for extensions to request access only to modify CSS?

                                                                    1. 4

                                                                      CSS can still exfiltrate sensitive page content (albeit attacks are harder to write).

                                                                      1. 1

                                                                        If you write your own CSS this is no longer a problem :P.

                                                                        1. 1

                                                                          That’s good to know. I’m going to do some reading on this, but do you have anything you recommend?

                                                                      2. 1

                                                                        There are two sites I frequent that have awful stylesheets that I can’t stand so I have custom stylesheets that make them look better.

                                                                      1. 1

                                                                        While we’re sharing our experiences…

                                                                        “Sign in to confirm your age This video may be inappropriate for some users.”

                                                                        (In the US.)

                                                                        1. 8

                                                                          mpv 'https://www.youtube.com/watch?v=5T_CqqjOPDc'

                                                                          That’s the only way I watch YT vids on my own system. :) I’ve even deleted my YT account.

                                                                          1. 2

                                                                            quietube also works: link

                                                                        1. 1

                                                                          If I (Canadian, can’t view it) go the the list of videos published by that account, it claims that ‘This channel has no videos”. I’m curious about what US viewers see?

                                                                          https://www.youtube.com/channel/UCuVPpxrm2VAgpH3Ktln4HXg/videos

                                                                            1. 1

                                                                              Thanks!

                                                                          1. 1

                                                                            And there’s already a du replacement called ‘dup’: https://github.com/ritze/dup

                                                                            1. 1

                                                                              That’s a wrapper that hasn’t been touched in years.

                                                                              1. 5

                                                                                +1. Everyone else seems to love GnuCash.

                                                                                1. 4

                                                                                  I recently switched from GnuCash, which did work but felt unpolished and unreliable in edge cases, to Beancount, and why did I not do that sooner. I feel at home in my editor with autocomplete, regex search, bean-check for linting, bean-format for formatting and git for tracking (!!). Refactoring is as easy as with code, while it was the most manual and painful thing in GnuCash. Python plugins are a breeze and I already made a few while I never surpassed the inertia of automating GnuCash. The web UI makes reports more intuitive than anything in GnuCash, and there’s an SQL language for custom stuff. And finally, I can assert more things I care about and leave flexible more things I don’t. Try Beancount (or any other ledger port I suppose, but yay Python plugins).

                                                                                2. 2

                                                                                  why not use sqlite or something?

                                                                                  1. 3

                                                                                    Because plain text is much simpler than SQL. You can just open up the file in $EDITOR and start editing, instead of having to run SQL over it to modify.

                                                                                    1. 1

                                                                                      But then if you want to do even the simplest things like sum by month you need to write a text parser first. I get that awk and stuff lets you do things with “tricks” but sqlite would let you do it without worrying about whitespace.

                                                                                      I can understand text-based input, but if you’re trying to track the flow of money by sources in a “real” way it seems pretty logical to use relations

                                                                                      EDIT: this isn’t necessarly pro-SQL, but it is pro-“structured data instead of worrying about escape characters in the format you defined”

                                                                                      Plain text is nice when you have an underspecified format but if you want to actually operate on it, it’s kinda gnarly

                                                                                      1. 5

                                                                                        EDIT: this isn’t necessarly pro-SQL, but it is pro-“structured data instead of worrying about escape characters in the format you defined”

                                                                                        Actually the data is very tightly structured. Here’s what Beancount allows. Any deviations are reported as errors.

                                                                                        But then if you want to do even the simplest things like sum by month you need to write a text parser first.

                                                                                        Generally the tool you’re using takes care of it. I’m using Beancount+Fava and it shows me pretty much every single metric that’s interesting out of the box. For everything else, it allows me to query the “database” using a SQL-like interface.

                                                                                        If you’re interested, I wrote a blog post on exactly this topic last week which could be relevant.

                                                                                1. 5

                                                                                  Wiki: https://wiki.lacto.se
                                                                                  Built with Sphinx: https://github.com/polyzen/wiki

                                                                                  The source will be moved to GitLab once I figure how to convert from Travis to GitLab CI. A number of projects and people use Sphinx for their wikis. I had started with Dokuwiki, and built up a fairly complex setup. It worked, but it lacked elegance. Eventually I switched to Gollum, and converted the rest to YAML files. This got me better acquainted with reStructuredText, but I disliked having to pepper in Gollum’s syntax – and the Gollum devs seem to have a dislike for rST. The project also seemed to die down quite a bit after GitHub decided to move their development to a private fork. Now I have the holy grail of wikis: Sphinx. I probably ought to make mine more inviting.

                                                                                  There’s another separate, private Sphinx repo for “notes”. Some pages at some point get “exported” to the wiki.

                                                                                  1. 2

                                                                                    “Why is it ‘the holy grail’,” you ask?

                                                                                    • Static-site builds, which you can host for free on something like GitLab pages

                                                                                    • Written in Python, and not PHP nor Ruby (not trying to disrespect)

                                                                                    • Supports CommonMark and reStructuredText (and I imagine more of the markup languages we love)

                                                                                    • Numerous plugins, of which I am only using a built-in so I can create links from my notes repo to my wiki

                                                                                    • You can screen changes through pull requests or you could setup some bot to automatically merge when tests pass

                                                                                    • Edit: With CI, you get automated builds, tests, and (eventually) deployment

                                                                                    1. 2

                                                                                      Zim ticks almost all your boxes!

                                                                                  1. 1

                                                                                    Is there a better tag to use for documentation and/or markup languages?

                                                                                    1. 4

                                                                                      If adopted, I suggest a different name. textprocessing makes me think of regexps, parsing, full-text search, stuff like that.

                                                                                      Maybe document-processing ?

                                                                                      1. 1

                                                                                        I’d say that’s the more accurate description and a good middle ground between textprocessing and typesetting. One does wonder if documentation/man pages still count as documents in that sense, but I’d say it’s clear enough. Though, as far as I know, tags cannot have hyphens/dashes, so it’d have to be documentprocessing.

                                                                                      1. 14

                                                                                        Most of the static site generators don’t seem to generate “sites”. They instead generate “blogs”, with the concept of posts and pages very deep-rooted in the implementation.

                                                                                        I mention because I recently came across statik which is a static site generator written in Python which really lets you generate sites. You get to define the “models” which you’d like your site to have (if you define Post and Page models, you have something like pelican). Imagine Django, but compile-time (for the lack of a better analogy).

                                                                                        I might write a blog (heh) post on this later, but I would definitely suggest checking it out if you’re interested in static sites.

                                                                                        1. 6

                                                                                          I maintain 3 websites, two with Jekyll (https://monix.io and https://typelevel.org/cats-effect/) and one with Middleman (https://alexn.org).

                                                                                          Both Jekyll and Middleman are perfectly capable for static websites. The blogging part is just a nice built-in feature.

                                                                                          1. 4

                                                                                            I’ve been using Nikola (edit: for my landing page), because at the time it was the only one that had incremental builds. You have to follow their guide to reconfigure it for a non-blog setup: https://getnikola.com/creating-a-site-not-a-blog-with-nikola.html

                                                                                            VuePress has my interest now, especially once Netlify support is implemented.

                                                                                            Edit: I also have Sphinx instances: one as a public wiki and the other as a private notes repo.

                                                                                            1. 4

                                                                                              The handful or so that I have worked with all support defining models, Sculpin and Tapestry (i’m the author) call them content types, Jigsaw calls them collections. All three can be used to generate a static site, but for convenience (and likely because the usual users are minimalist bloggers) they come “blog aware” which simply means they have a blog collection configured out of the box.

                                                                                              I have used all three and a few others such as metalsmith (which also supports collections via plugin) for the purpose of generating small static sites with a handful of pages for clients as well as reasonable sized multi author blogs.

                                                                                              TL;DR, yes some SSGs come shipped with blog content types (models) pre-configured but that doesn’t make them only good for generating blogs.

                                                                                              1. 2

                                                                                                This is interesting. I wish it didn’t use YAML though.

                                                                                                For the website, I ended up making a custom generator, and focus on blogs in most generators was one of the biggest reasons, even though not the only one.

                                                                                                1. 2

                                                                                                  Most of the static site generators don’t seem to generate “sites”. They instead generate “blogs”, with the concept of > posts and pages very deep-rooted in the implementation.

                                                                                                  Bravo for saying this. I’ve faced the same problem, with static generators forcing me to give an author / date setting for each page. This might make sense for blogs, but doesn’t for the simple site I want to build.

                                                                                                  And most of them force you to do things a certain way; it is so painful, which is no wonder people just go back to Wordpress.

                                                                                                  Amy Hoy wrote a great article on this : https://stackingthebricks.com/how-blogs-broke-the-web/

                                                                                                1. 4

                                                                                                  gina (“fast”) or fugitive (mature and popular) and gv.