pointless

  • 0 Posts
  • 64 Comments
Joined 1 year ago
cake
Cake day: June 23rd, 2023

help-circle








  • wvstolzing@lemmy.mltoLinux@lemmy.mlIs anyone using awk?
    link
    fedilink
    arrow-up
    23
    arrow-down
    1
    ·
    11 months ago

    awk predates perl as well as python by a pretty large margin (1978); it’s useful, of course, for processing things in a pipeline, but as it became obsolete as a general-purpose scripting language, users have had less and less of a reason to learn its syntax in detail – so nowadays it shows up in one-liners where it could be replaced by a tiny bit of cut.

    I had worked through a good bit of the O’Reilly ‘sed & awk’ book – the first programming book I got, after being enticed by shell scripting in general. Once I learned a bit of Python, & got better at vim scripting, though, I started using it less and less; today I barely remember its syntax.



  • FWIW, I’m typing this on the latest GNOME, on wayland, on nvidia proprietary drivers; and it works just fine — EXCEPT for suspend & resume, which is annoying to be sure; but on 2 screens with different refresh rates & different dpi ratios I at least don’t run into some of the weird behavior I do run into using X11.

    I used to be an Xfce purist; but this particular setup is even less taxing on the GPU (GTX 970) compared to Xfce’s standard compositor (around 20W on light usage, vs. 35+W); & and the font rendering is slighly better, which is a huge factor AFAIC.


  • wvstolzing@lemmy.mltoLinux@lemmy.mlD-Bus overview
    link
    fedilink
    arrow-up
    26
    ·
    edit-2
    11 months ago

    Skimmed over the whole article – I wish this had been available back when I was trying to piece together the basics from the documentation. There really needs to be a 2nd part, though, with some discussion of the GVariant signatures, which the author says were ‘beyond the scope of’ this article – which is true; nevertheless, understanding that syntax (and how to use it e.g. with gdbus) is an absolute requirement for using dbus properly; and as a silly amateur, I lost so much time over them.


  • Another vote for Tesseract – just to clarify the terminology, though: PDF is a fragile format best used read-only; so you really don’t want to edit a pdf, but make a new one using the same (or cleaned-up) bitmaps and a new ocr text layer.

    Now, tesseract is excellent at recognizing glyphs; but especially if the scanned image is a little fuzzy, the layout detection falters; and when it falters, you get redundant line breaks, & chunks of text in the wrong order – all of which gets incredibly annoying for searching & copying purposes. So if you can spare the time, and the text requires it, you may need to mark regions (paragraphs & titles mainly) on the bitmap image manually. There exist a few frontends to Tesseract that help with a task like that; check out, e.g., https://github.com/manisandro/gImageReader - inside single paragraph blocks of text, Tesseract doesn’t get as easily confused; and the text output is in the correct reading order, & w/o redundant breaks.