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

Did you edit it to fix it? Is HN refusing to include the period as part of the URL?

A gotcha for me originally and perhaps others is that while using ordering like

   $ ./outerr  >blah 2>&1
sends stdout and stderr to blah, imitating the order with pipe instead does not.

   $ ./outerr  | 2>&1 cat >blah
   err
This is because | is not a mere redirector but a statement terminator.

    (where outerr is the following...)
    echo out 
    echo err >&2

Useless use of cat error/award

But also | isnt a redirection, it takes stdout and pipes it to another program.

So, if you want stderr to go to stdout, so you can pipe it, you need to do it in order.

bob 2>&1 | prog

You usually dont want to do this though.


The point is that the order in which that is processed is not left to right.

First the | pipe is established as fd [1]. And then 2>&1 duplicates that pipe into [2]. I.e. right to left: opposite to left-to-right processing of redirections.

When you need to capture both standard error and standard output to a file, you must have them in this order:

  bob > file 2>&1
It cannot be:

  bob 2>&1 > file
Because then the 2>&1 redirection is performed first (and usually does nothing because stderr and stdout are already the same, pointing to your terminal). Then > file redirects only stdout.

But if you change > file to | process, then it's fine! process gets the combined error and regular output.


Try it without the `cat` and tell me what you get.

You can pipe the fd directly:

# echo 1 >&2 2>| echo


Why would that second one be expected to work?

Yep, there's a strong unifying feel between the Unix api, C, the shell, and also say Perl.

Which is lost when using more modern or languages foreign to Unix.


Python too under the hood, a lot of its core is still from how it started as a quick way to do unixy/C things.

Actually closer to π and matches the more sensible date format.

(Yes this is worth fighting over!)


while true that month being 1st making little sense, the good format usually features leading zeros, so '22/07'

I've not listened to that song much at all. I am however obsessed with Machine Gun which has all those elements and more. Maybe I'll have a re-listen to SSB.

Do it; I think the political subtext of weaving an anti-war statement into the national anthem makes it both very obvious and very elegant at the same time.

Speculation 1. The bicameral mind was created as a result.

Speculation 2. The earliest creatures with two eyes may have been conjoined twins -- which were more successful in life than their single-celled/bodied siblings.


The article is not about this, but about an unexpected way of how the original 3 eyes of the vertebrates have evolved into the 2 eyes that most vertebrates have today.

See other comments.

In most cases the evolution of eyes in animals has been from more eyes to fewer (but more complex) eyes, and not the opposite.


I was looking for that too. I'm sure I've read that single cell animals were sensitive to light (and/or heat). I guess it's a speculation though, because we'd have no physical evidence.

We know that modern flagellates can steer to or away from light. When they started doing that is, as you say, pretty difficult to establish since they haven't left archaeological evidence. Unlike shellfish.

There is plenty of evidence.

As another poster has said, most unicellular eukaryotes are either attracted or repelled by light and this is very simple to observe.

For some of them the mechanism of photoreception is partially understood, because they use photosensitive molecules related to those used in the eyes of animals.

Moreover, there are many bacteria that can sense light, so they are also attracted or repelled by light. Again, many of them use rhodopsins for sensing light, the same as our eyes.

Some light-sensitive molecules, like rhodopsins, are known to have existed in living beings for at least a few billion years, so the ability to sense light is that old.

Where the animals have innovated is in developing optical systems that can capture 2-dimensional images, instead of just sensing whether light is present or absent, like the other living beings can do.



In Australia we have https://dadlan.au/ monthly. Physical presence and remote is OK.


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

Search: