Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)S
帖子
21
评论
322
加入于
3 wk. ago

  • where in your pipe you got a non-null exit code

    First thing you want is set -e and set -o pipefail. That should report the errors in human-parseable form.

    Second, to capture exit codes from each command/program, you have to run each of them in sequence yourself, connected by pipes that you create via mkfifo — the same way as you would do it in any other programming environment. Bash's | pipes are just a convenient shorthand for this, so if you want full control, you have to ditch the convenience.

  • In Emacs Lisp, you use one of these two:

    (defun funcname (arg1 arg2) (+ arg1 arg2))

    (lambda (arg1 arg2) (+ arg1 arg2))

    — with the latter typically being an argument to another function or macro.

  • As is tradition with the Nazis.

  • In Lisp, at least the Emacs Lisp with which I have experience, it's customary to put in nil (Lisp's null) for any omitted arguments in the middle that you can't be arsed to specify — aside from just leaving off arguments at the end. In JS, typing in undefined in every such case would probably be an annoyance, so I'm guessing coders need to check for both undefined and null in these circumstances.

    Overall, it's remarkable how Lisp teaches one to be much more relaxed about programming practices than is typical for mainstream languages. Design patterns? Data structures? Shit, just pass in a list or an assoc array, and maybe a function here and there. Also everything is an expression, enjoy your ternary (if) at any point anywhere.

  • Remarkable how if the parenthesis is shifted from lambda() to (lambda), people lose the ability to comprehend things.

  • Functions are definitely not subshells in Bash, seeing as anything modifying the environment, like pyenv and such, is implemented as functions instead of scripts — specifically because functions are run in the same shell instance.

    Unless 'subshell' means something in the vein of 'like a new shell, but not really'.

  • I mean, the go-to approach in Lisp, for example, is to have null as the default value (which doubles for false in there). And check for that in the function.

  • Lisp programmers seeing these ‘amazing things’:

    But yeah, every time I'm trying to do a ternary in Lua, I miss being able to just throw in an if. Thankfully it can be amended with Fennel.

  • sentient shroom

    Is he a descendant of Lenin?

  • I feel like it's worse here than on Reddit. I've joined less than a month ago, and already had things ‘explained’ to me by someone completely missing how the entire sarcasm thing works, and got several downvotes on top. On Reddit I can go months between such occurrences, and upvotes usually indicate that people get the clue.

  • ‘There Will Be Blood’ depicts those early days quite graphically.

  • It was two randos from the SS: a designer and an artist. It's in Wikipedia.

  • Inb4 Hugo Boss.

    Hugo Boss didn't design shit, as he wasn't a designer, and his company wasn't in fashion design until after his death. His company was one of the many manufacturers that the regime contracted for manufacturing uniforms, namely the SS uniforms designed by two dudes in SS.

    However, Hugo Ferdinand Boss was a member of the Nazi party from 1931.

  • “this is spot on lol”

    — Grass, five hours before your comment.

  • Wherein by ‘multigenerational’, you presumably mean that at least three generations live under one roof. Like in one of those Gabriel García Márquez novels.

  • This one is rather a sub for former fans, of the “““he's a neutral interviewer””” days, which are now clowning on how stupid Rogan has become. Without the political themes, on which Rogan speaks a lot now, there's not much to even discuss.

    There's actually another alternative sub for proper fans. =)

  • My brain when I'm trying to sleep.

  • Zelensky will inevitably reject this nonsense of a deal, just how he's done with such deals proposed by Russia in the past. So it could be that Trump wants to just shrug and say “okay, we tried, no more weapons then”. As he's been trying to do from the start.

    The actual outcome, as usual, depends on whether Zelensky gets to talk to Trump again and get him to flip in his confused haze, yet another time.