Hacker News new | past | comments | ask | show | jobs | submit | benjaminwai's comments login

Just a note with the Bash encoding method. It should be with the -n option:

  $ echo -n "abcde" |base64
Otherwise, without the -n, echo injects an extra newline character to the end of the string that would become encoded.


Simply don't use echo if you want predictable output. Use printf. https://linux.die.net/man/1/printf


This is the way

(however, the parent's use of "echo" would be fine as it's not using a variable and so won't be interpreting a dash as an extra option etc)


echo -n is not safe, because some versions of echo will just print "-n" as part of their output (and add a newline at the end, as usual). In fact, XSI-compliant implementations are required to do this (and the same for anything else you try to pass as an option to echo). According to the POSIX standard[1], "If the first operand is -n, or if any of the operands contain a <backslash> character, the results are implementation-defined."

[1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/e...


Thanks - I wasn't aware that echo was that problematic as I target bash (usually v4 and above) from my scripts.

I just tested it out with:

  sh /bin/echo -n "test"
  /bin/echo: 3: Syntax error: "(" unexpected
I didn't realise until recently that printf can also replace a lot of uses of the "date" command which is helpful with logging as it avoids calling an external command for every line logged.


> printf can also replace a lot of uses of the "date" command

Very cool (but bash-specific). Manual: https://www.gnu.org/software/bash/manual/bash.html#index-pri...

> sh /bin/echo -n "test"

This is gibberish -- it's trying to execute /bin/echo as if it was a shell script. Maybe you meant:

  sh -c '/bin/echo -n "test"'


Not all echos accept -n to suppress newlines.

printf is always the better choice.


Yeah been bit by few times. Somehow keep forgetting.


There has to be some amount of competency becoming a founder, CEO and a millionaire, with the various ventures he was involved.


The French research ship Atalante is almost there:

"It carries the Victor 6000 autonomous robot, capable of descending to a depth of 6,000 metres, beyond the 3,800 metres of the wreck's position"

https://www.reuters.com/world/europe/france-send-ship-titani...

Last I checked on MarineTraffic Atalante was about 100NM away from site. Would it not help?


That is good but probably one of the best/only tools for the job. It is probably already too late though.

All that is still theory, we don't even know if the submersible isn't already destroyed.


In their EC-Type Examination Certificate it mentioned the harness "in 3 different wire rope lengths: 30m, 50m, 80m".


"Others still have reported that the internet outage could be circumvented by connecting through a virtual private network (VPN), giving a hint of where the wider problems lie, and suggesting that Virgin Media’s outage, like that at Facebook in 2021, may have been the result of a flaw in the deep-level routing systems that allow internet services to connect to each other."


George Hotz has just been hired to rewrite Twitter search in 12 weeks. No code change is going out the window.


Must be, the flock votes with their feet.. umm hooves.


In no part of the news article mentioned they were actually admitted into the building. They were just standing around outside in the cold waiting for who knows how long. Nothing happened. This is literally about nothing.


I empathize with those remaining with a H1B, they would be worried sick. They would have less choices and would otherwise have less of 60 days to find a new job or to leave the country.


I think we are missing some contexts here. I have been trying to find more information about them. From what I found [1] (hopefully accurate) it looks like they are a new team - Beta in August 2021 and just incorporated in this February. The founder/CTO is a full stack developer. I speculate they are a very small team (1-2 developers at the most) and a relatively straightforward architecture. In that context I suspect it is quite feasible to go from local to production without going through staging: They are likely to have a self sustained stack that can be packaged; they don't have a huge database or collection of edge cases; they have few customers, low expectation in terms of service level; they don't have stakeholders to review and approve features done (they are their own bosses). I emphasize with where they are, I have been in the same place at some point. It will be interesting to see whether this is sustainable without staging, or for how long, as they grow in team and offering.

[1] https://www.indiehackers.com/product/squeaky


Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: