Hacker Newsnew | past | comments | ask | show | jobs | submit | tkocmathla's commentslogin

It's very distracting to have every sentence in this article be its own paragraph.

It's LLM slop unfortunately, bears the hallmarks at least :(

I love this, from a comment on the article:

  He had in his path a script called `\#` that he used to comment out pipe elements like `mycmd1 | \# mycmd2 | mycmd3`. This was how the script was written:
 
  ```
  #!/bin/sh
  cat
  ```

A similar trick:

    #!/bin/sh
    $*
that's my `~/bin/noglob` file, so when I call a zsh script from bash that uses `noglob`, it doesn't blow up.

I think the script would be named as `#` so that it can be called via `\# mycmd` instead of `\\# mycmd`.

Yes! That one's going in my $PATH. Such a useful use of cat!

What does it provide over

mycmd1 #| mycmd2


Theirs "turns off" one element of a pipeline; yours turns off everything after a certain point.

This will output the stdout of mycmd1:

    mycmd1 #| mycmd2 | mycmd3
This will output the stdout of mycmd3:

    mycmd1 | \# mycmd2 | mycmd3

Can you explain to me why either of these is useful?

I've somehow gotten by never really needing to pipe any commands in the terminal, probably because I mostly do frontend dev and use the term for starting the server and running prodaccess


Pipelines are usually built up step by step: we run some vague, general thing (e.g. a `find` command); the output looks sort of right, but needs to be narrowed down or processed further, so we press Up to get the previous command back, and add a pipe to the end. We run that, then add something else; and so on.

Now let's say the output looks wrong; e.g. we get nothing out. Weird, the previous command looked right, and it doesn't seem to be a problem with the filter we just put on the end. Maybe the filter we added part-way-through was discarding too much, so that the things we actually wanted weren't reaching the later stages; we didn't notice, because everything was being drowned-out by irrelevant stuff that that our latest filter has just gotten rid of.

Tricks like this `\#` let us turn off that earlier filter, without affecting anything else, so we can see if it was causing the problem as we suspect.

As for more general "why use CLI?", that's been debated for decades already; if you care to look it up :-)


no no, not asking why use CLI. If I was less lazy, I would use it more often

I can imagine a pipeline where intermediate stages have been inserted to have some side effect, like debug logging all data passing through.

Ah duh, cheers

Wow I hate* that. I use bracket comments. They're cool cause they are bracket comments, so I use it in scripts to document pipelines. They are annoying cause they are bracket comments, in an interactive shell I have to type more and in TWO places. It's fun to reason-out how it works ;)

  $ echo foo | tr fo FO | sed 's/FOO/BAR/'
  BAR
  $ echo foo | ${IFS# tr fo FO | } sed 's/FOO/BAR/'
  foo
It's nice to have a way to both /* ... */ and // ... in shell scripts though:

  foo \
  | bar ${IFS Do the bar. Do it. } \
  | baz
* in the best possible way, like it's awful - I hate I didn't think of that

for multiline pipes, it's WAY better to format like

    foo   |
      bar |
      baz 
You don't have to use backquotes, AND, it allows you to comment line by line, because there's no backslash messing with the parser.

I also use a last `|\ncat` so you can delete any line and you don't have to worry about the last line being a bit different than the rest

I created a list of similar tricks in https://github.com/kidd/scripting-field-guide in case anyone wants to take a look


You'll probably dislike this too:

  $ {
  >     echo foo \
  >     && echo bar \
  >     || echo baz ;
  > }
  foo
  bar
  <^P><^A>$<^F>IFS
  ${IFS#   echo foo   && echo bar   || echo baz ; }
  $ _
There's good and bad to both approaches. I like how I can use () and {} to bracket things and otherwise every line that end in \ is continued. I line-up on the left with the operator, you with indentation. When you use a # style comment, you have to look up and back and forward to see what the operator is you are continuing over to the next line:

  $ foo |
    bar | # ?Do? *the* $bar$ && [do] {it!}
    baz
Which only takes an extra neuron or so, but then history...

  <^P>
  $ foo |   bar | # ?Do? *the* $bar$ && [do] {it!}
  baz

aha! I see what you mean, it's indeed a nice option, yep.

Using brackets like this is something I never thought of, and it's probably why it's hard for me to process it, but I can see it provides nice annotation capabilities, and it's a more self-contained style.

Thx for sharing!


Cool idea, but of course the very first image I clicked into was a dick.


I recently learned that in Bhutan, they are sacred smybols since a long time

https://en.wikipedia.org/wiki/Phallus_paintings_in_Bhutan

Since I know that, I am rather amused every time I see a dick painted anywhere.


Haha yeah, can't have nice things I guess. I'm currently working on automated moderation to catch that stuff faster. In the meantime, Report button exists if you stumble into anything awful.


First thing I saw was a Swastika. It was painted on an ex Nazi building, but still...


A swastika or a Hakenkreuz?


Most people do not know about the directional-flip in these signs


The Hakenkreuz is tilted at an angle.

The Hindu and Buddhist symbols are very different.



Well, after skimming these, I have to admit that Im also in the group of "most people do not know..." :-D

Thanks for sharing!


I got this itch too when I came across tinyrenderer [1] and worked through the early lessons through shading, but didn't quite finish the texture mapping yet [2]. It was fun to work in pure C from first principles, even side-questing to write a simple TGA file reader and writer.

I'd be very interested to see your tutorial when it's done!

[1] https://haqr.eu/tinyrenderer

[2] https://github.com/tkocmathla/tinyrenderer


tinyrenderer looks impressive! The tutorials look good too. I might have to borrow some ideas from them.

No idea when I'll get around to making the videos, but if you want to follow my channel it's at https://www.youtube.com/@fast_erik


The "locakly" typo is perfectly placed in the comment thread of this article!


And 3 'i's?


Personally, I'd love this is if it were opt-in. That way, I could gradually reduce my repeat search dependence based on me recognizing my actual habits, rather than giving a browser extension carte blanche access to my entire search history. Maybe that's already possible, but I didn't see any documentation about the config file.


First off, the ASCII art raccoon is adorable.

The documentation here seems very thorough, but I'd really like to see some screenshots or a screencast of this in action! I've been using Diffview.nvim [1] lately to get just the view of all diffs in the current branch vs its merge base, with a nice file tree on the left hand side. A plugin like yours that also brings in reviewing features sounds great.

[1] https://github.com/sindrets/diffview.nvim


Mark Kermode is wonderful. Incredibly intelligent takes, thoughtful analysis, and brutal honesty when it's warranted. He's a delight to watch.

https://www.youtube.com/@kermodeandmayostake


> There’s a feeling in Hollywood that audiences have short attention spans and must be assaulted with fresh novelties. I think such movies are slower to sit through than a film like “Shawshank,” which absorbs us and takes away the awareness that we are watching a film.

This resonates with me and is a really concise way to explain why, to me, a 2 to 2.5 hour long Marvel or Transformers movie feels like an eternity, while a movie like Shawshank never has me checking my watch.


Ghibli movies are a different class of movies, but the exact thing that you describe "absorbs us and takes away the awareness that we are watching a film" is what happends to me. The story is so intriguing that I even "forget" that I'm watching a painted movie.


Spirited Away contains an accurate review of itself in the title!


I like the use of happends in this context, a good mixture of tenses


I agree with sibling that Kurosawa does this very well.

My take: Marvel movies have a loooot going on. That might just be draining after a while, since the human brain isn’t wired for constant arousal. Old school action movies are still quite fun to watch and don’t felt that long, perhaps because were given time to ‘rest and digest’ the action.

Marvel has no clue, just keeps pumping and pumping. I especially liked the animated Spider-Man movies, but am super tired of a 2.5h smorgasbord of nonstop action. Even John Wick has a cadence.


I made the mistake of watching Spider-Man: Across the Spider-Verse. I just could not keep up and walked out early on. They had dialed everything to 11 and never let up.


Interesting, it’s one of very few movies I went back to rewatch because it was such a great cinematic experience. Maybe I was more forgiving to it because it was a new format and a new take on the story of Spider-Man (who’s a great superhero without all the stupid Iron-Man gadgetery that the Tom Holland movies do).


Kurosawa did this better than anyone. He could make you sit through 2.5 hours of grinding drama and make it feel like barely 5 minutes have passed. Ran (1985) was like that.


Slow media or die!

The particular niche of television Vince Gilligan has carved out for himself is endlessly fascinating to me.

With three shows over the course of 20 years, each more detached from the sensationalism of its predecessor, he (and it must be said, the creative team surrounding him, usually more than half women) has trained an audience to appreciate slower TV that takes its time and nevertheless works from moment to moment. On this count alone, he has my undying respect, as I think it's the biggest sort of success an artist can hope to have, to advance your point of view and come to be valued for it in itself.


I think a part of it is down to demographics with disposable income. Teenagers have a taste of freedom and some pocket money and the next gimmick films is a good way to spend it. It's the same as they mature into 20 somethings. In their 30's they may be more career focused and have less time, a good chunk of them will tire of novelty and move towards more interesting/arthouse films. When kids come into the picture there's even less time and money so things change again, then the cycle repeats.

So, at least from my opinion, "new" will always be a good sales tactic to catch attention.


"it was long at 142 minutes"

How times have changed


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: