HNHacker News
TopNewBestAskShowJobs

mgdlbp

1,673 karma · joined July 14, 2021

submissionscomments
mgdlbp··on Text rendering hates you (2019)
https://int10h.org/blog/2016/01/windows-cleartype-truetype-f...

http://www.electronicdissonance.com/2010/01/raster-fonts-in-...

mgdlbp··on Apple apologizes for iPad 'Crush' ad that 'missed the mark'
Brings to mind the OK GO music video with all the exploded guitars that they stated were already junk. Spilled paint is reminiscent of their videos too.

They also smashed pianos in the Rube Goldberg video, and a TV with a sledge. Now I wonder if that was a 1984 reference.

https://www.youtube.com/watch?v=0BTnGgzO-tU https://www.youtube.com/watch?v=qybUFnY7Y8w

mgdlbp··on Road resurfacing during the daytime without stopping traffic [video]
For the bridge only, Marti also made a more sufferable cut in German, that is on the OP channel (https://www.youtube.com/watch?v=VJLX3C0eg3g)

The segue from CG is much more sensible

mgdlbp··on My favourite Git commit (2019)
"quote unification'':

  most typefaces: “Hello” „Hallo“
Verdana: “Hello” „Hallo“
mgdlbp··on NASA unlocks $1B canister of asteroid dust
That's a lot of hot pixels for base ISO! Could be the focus stacking intensified them.

That camera can actually get a bit more resolution out of sensor movements, though the lens might be at its limit already, or focus was still a little off. edit: it's probably the glovebox glass.

mgdlbp··on Keeping a long shell history
a weaker method is to set a non-default HISTFILE after HISTSIZE etc
mgdlbp··on How does one patch KDE2 under FreeBSD? (2012)
Deletionists got to the English Wikipedia page

https://www.wikidata.org/wiki/Q3271851

https://web.archive.org/web/20201214110440/https://en.wikipe...

mgdlbp··on Hans Reiser on ReiserFS deprecation in the Linux kernel
(re: dead comment 39066268) I'm now very interested in what Reiser would think of the present state of the (semantic) web. (edit: i.e, the thought experiment, realized: transplant someone just a few years in time --- what gradual changes would they uniquely observe?)
mgdlbp··on Vision isn't what you think it is – see for yourself [video]
‹‹‹ "What a camera actually shows is its processor's reconstruction of objects based on input provided by the sensor — not the actual light received by its sensor."
mgdlbp··on Elisp in Replacement String

  :%s/\([0-9]\+\))/\=submatch(1)-1.')'    " vim

  perl -pe 's/([0-9]+)\)/$1-1 .")"/e'

  ruby -pe 'sub(/([0-9]+)\)/){"#{$1.to_i-1})"}'
mgdlbp··on CLI user experience case study
btw xterm has a hack for editors without mouse support – turn clicks into the right number of movement key presses,

  uxterm -xrm '*VT100.translations: #override !<Btn1Down>: vi-button() readline-button()'
mgdlbp··on Tell HN: Bash.org is no more
https://web.archive.org/web/20040212/http://bash.fi

https://web.archive.org/web/20070227/http://qdb.gr

https://web.archive.org/web/20060402/http://qdb.hu

https://web.archive.org/web/20040420/http://qdb.us

mgdlbp··on Tell HN: Bash.org is no more
ccTLDs, inexhaustive

https://web.archive.org/web/20100222/http://bash.org.az

https://web.archive.org/web/20070217/http://bash.org.by

https://web.archive.org/web/20060424/http://bash.org.il

https://web.archive.org/web/20071022/http://bash.org.kg

https://web.archive.org/web/20061203/http://bash.org.lv

https://web.archive.org/web/20090830/http://bash.org.md

https://web.archive.org/web/20060101/http://bash.org.pl

https://web.archive.org/web/20090421/http://bash.org.ro

https://web.archive.org/web/20040611/http://bash.org.ru

https://web.archive.org/web/20110523/http://bash.org.tj

https://web.archive.org/web/20080105/http://bash.org.ua

https://web.archive.org/web/20101117/http://ibash.org.pl

https://web.archive.org/web/20070609/http://ibash.org.ru

https://web.archive.org/web/20091004/http://bash.cc

https://web.archive.org/web/20030805/http://bash.cx

https://web.archive.org/web/20080315/http://bash.ee

https://web.archive.org/web/20040608/http://bash.hu

https://web.archive.org/web/20090322/http://bash.im

https://web.archive.org/web/20060205/http://bash.lv

https://web.archive.org/web/20180314/http://bash.no

https://web.archive.org/web/20060112/http://bash.ro

https://web.archive.org/web/20080219/http://bash.tj

https://web.archive.org/web/20120114/http://bash.tk

https://web.archive.org/web/20061115/http://ibash.de

https://web.archive.org/web/20160109/http://ibash.im

mgdlbp··on JAL A359 at Tokyo collided with Coast Guard DH8C on runway and burst into flames
(I don't think that's what most mean when they say 'chance', but I get what you mean ;) It's similar to realizing how seating choice radically alters your (very small) chance of death by train crash.

I was going to say 'chance of death on that day' but apparently rail transport is remarkably safe and in micromorts, you're as likely to die in one day at 20 years of age as in 10000 km by rail, or (only!) 1600 km by air.

Now, it appears that 1600 km is also nearly the distance of the average passenger flight (a disappointly difficult datum to discover on the internet in 2024). Is this a counterpart to the reassuring quips comparing the chances of death by lightning: that boarding a plane doubles your chances of dying that day?

https://en.wikipedia.org/wiki/Micromort#Travel

mgdlbp··on There is an OOM kill count in Linux
Tangentially, an issue with the desktop use case is that the main process of a long-running browser is often the first to be killed, instead of one of its content processes, which it can survive losing. This is the case since 2019 as the kernel no longer prefers killing children.[0]

As far as I know, unless a browser manages its oom_score_adj, which none do, a wrapper is insufficient as a workaround and a daemon would have to do so on its behalf, because the value is inherited when forking.

[0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...

mgdlbp··on Compare Google, Bing, Marginalia, Kagi, Mwmbl, and ChatGPT
Internet Archive remembers. https://web.archive.org/web/*/google.com/search/%2A

Find a query of interest, see for yourself (and take a snapshot of the present state for posterity).

The api enables more powerful queries, https://web.archive.org/cdx/search/cdx?url=google.co.jp*&pag...

Also try other search engines and languages.

mgdlbp··on There is an OOM kill count in Linux
Enable Alt+SysRq+F and do it manually. Works in seconds every time; the kernel can take days because it's not eager enough when thrashing.

Can have security implications, but the target is chosen in the typical way and screen locks should be setting a score_adj to avoid being picked.

mgdlbp··on Gentoo goes Binary
a garden path sentence, but it parses.

[only on HN] could [any state [that Gentoo was ever in]] be [reflected upon [as "just worked like a breeze"] unironically]_,_ and [I] mean [that] [in a fond, loving way]

mgdlbp··on Par: Paragraph reformatter, vaguely similar to fmt, but better
M-x eshell

  Welcome to the Emacs shell
  
  /tmp $ set-variable `x 6; echo $x
  6
  /tmp $ 
M-: (term "pwsh")

  PowerShell 7.4.0
  PS /tmp> set-variable `x 6; echo $x
  6
  PS /tmp> 
Disturbing.
mgdlbp··on There's a Concorde Engine Complete with Afterburner for Sale on eBay
The parts of the logbook shown in the listing seem to imply that this engine was removed in the 1980s when the plane was still registered as G-BFKW.

As for the plane, engines 3 and 4 are visible in a 2010 photo.¹ By 2015 the ducts had all been covered.², albeit № 3 haphazardly in the rear.³

¹ https://commons.wikimedia.org/wiki/File:Concorde_(British_AW...

² https://commons.wikimedia.org/wiki/File:Concorde_2015-06_673...

³ https://commons.wikimedia.org/wiki/File:Concorde_2015-06_692...

mgdlbp··on String pinsetters are upending bowling
cf. patent US 92467 from 1869 — https://worldwide.espacenet.com/publicationDetails/originalD...
mgdlbp··on Why are we being DDoSed by Cloudflare?
Wait, is that[0] MS Sans Serif? MS PGothic? What version of Windows would fall back to that in 2013?

[0] https://web.archive.org/web/20210826103144/http://www.crimef...

mgdlbp··on Fish – Update on the Rust port
Additionally,

    $ f=-x
    $ cat "$f"
    cat: invalid option -- 'x'

    $ cat -- "$f"
    cat: -x: No such file or directory
    # ^-- correct, but:

    $ f=-
    $ cat -- "$f"
    reading stdin...
    reading stdin...
    ^C

    $ f=./-
    $ cat -- "$f"
    cat: ./-: No such file or directory
...better to glob with ./* than *
mgdlbp··on Fish – Update on the Rust port
zsh, short loop:

    for i in {1..10}; <<<$i
powershell:

    foreach ($i in 1..10) { $i }

    1..10|%{$_}
mgdlbp··on Rockwell Retro Encabulator [video]
https://ncatlab.org/nlab/all_pages

;-D

mgdlbp··on The bash book to rule them all
The first answer is wrong, so is the second's explanation... twice it conflates unset with null/empty. Very illustrative!

The substance of the first answer:

    #!/bin/bash
    
    # Check if the first parameter is not provided
    if [ -z "$1" ]; then
        echo "Error: Parameter not provided."
        exit 1
    fi
The snippet precedes the true statement:

> This checks if the first parameter (`$1`) is empty.

But what happened to the supplied task? It was stated and echoed as:

> Anonymous: ...if it's not passed?

> ChatGPT: ...if a specific parameter is not passed...

> ChatGPT: ...if the parameter is set.

The second answer:

    #!/bin/bash
    : ${1?"Error: Parameter not provided"}
This is correct. But the explanation is not:

> ...and the `${1?...}` part checks if the first positional parameter (`$1`) is unset or null.

--

(the most succinct possible idiom is `#!/bin/bash -u`)

mgdlbp··on The bash book to rule them all
Some (topical) amusements:

    $ echo 25 | pwsh -c '$input-replace"\d",{2*"$_"}'
    410
    $ echo 25 | perl -pe 's/\d/2*$&/eg'
    410
```

    PS> $temp:pwsh_out = 10000
    PS> /bin/cat /tmp/pwsh_out
    10000
```

    $ echo ''''

    PS> echo ''''
    '
```

    PS> $Y = { param($f) . { param($x) . $x $x } { param($y) . $f { param($x) . (. $y $y) $x }.GetNewClosure() }.GetNewClosure() }
    PS> $fac = & $Y { param($f) { param($n) $n -lt 2 ? 1 : $n * (. $f ($n - 1)) }.GetNewClosure() }
    PS> & $fac 5
    120
```

    PS> gv -v|% m*d|% t*
    gv -v|% m*d|% t*

    PS> &($x={"&(`$x={$x})"})
    &($x={"&(`$x={$x})"})

    $ bash
    $ eval ${x='echo eval \${${x@A}}'}
    eval ${x='echo eval \${${x@A}}'}
```

bilingual pun,

    .ps1            .pl
     1               1
     {1}             {1}
     end {1}         sub {1}
     {end {1}}       {sub {1}}
     &{end {1}}      &{sub {1}}
```

    awk  -e 'BEGIN { printf "3\n" }'
    perl -e 'BEGIN { printf "3\n" }'
    ruby -e 'BEGIN { printf "3\n" }'
    pwsh -c 'BEGIN { printf "3\n" }'
```

    $ time ...; time ...; ....
    real 0.00 ...
    real 0.00 ...
    real 0.03 ...
    real 0.22 ...
mgdlbp··on Shellcheck finds bugs in your shell scripts
Opportunistic interjection that unnecessary ${} is the most bothersome style choice in any language I know of:

- It obscures actual uses of modifiers, particularly ${foo-} when set -u is in effect,

- It's obvious when a name runs into subsequent text, even if one has somehow avoided syntax highlighting,

- And expansions followed by identifier chars don't actually occur in practice. Cases where the quotes cannot be moved to surround the variable are often interpolation of an argument to echo, whose behaviour is such a mess not even portable between bash and dash that shellcheck ought to be demanding printf at all times instead!

mgdlbp··on Vore: A minimal, no-bullshit web-based RSS/atom feed reader
GNU parallel, since 2010: https://git.savannah.gnu.org/cgit/parallel.git/refs/
mgdlbp··on The Unix timestamp will begin with 17 this Tuesday
Reminds me of sdate for the Eternal September epoch. 10000 Sep 1993 was 2021-01-16.

http://www.df7cb.de/projects/sdate/

one commit message for the QDBs:

    From 14df411817feda9decf9dd8a6cd555d71f199730 Mon Sep 17 00:00:00 2001
    From: Christoph Berg <myon@debian.org>
    Date: Thu, 4 Jun 2020 20:05:49 +0200
    Subject: [PATCH] Fix long --covid option
    
    
     scripts/sdate.in | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
Sep 17 2001 (1000684800) is a special date from git-format-patch. Its significance is lost to time.
Page 1 of 16Next →