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

The only problem with ECC is that it is only an improvement, not a solution. Every error correction has a limit to the number of errors it can detect or correct. There is no such thing as absolute security.

Having a small remaining probability of error is not a problem at all, if it's small enough. There are always potential sources of failures (such as a meteorite crashing on your server). If the probability of one source is dwarfed by others then it doesn't matter.

It's not a "problem" if, as you say, perfection is an unreachable goal. The only question is whether it's an improvement over the status quo, and it clearly is.

Debian has it out of the box:

    $ LANG=C apt-cache policy pyspread
    pyspread:
      Installed: 2.2.3-1
      Candidate: 2.2.3-1
      Version table:
     *** 2.2.3-1 500
            500 http://ftp.de.debian.org/debian trixie/main amd64 Packages
            500 http://ftp.de.debian.org/debian trixie/main i386 Packages
            100 /var/lib/dpkg/status

Thank you!

I would say the bookshelves are a bit too thin. But I like your approach. I am doing the same, although a bit less consequent.

If you can give up regexp greediness sed+column can do it:

    sed -rn 's/^([^:]+):.*[ ]##[ ](.+)/\1:\2/p' $(MAKEFILE_LIST) | column -ts: -l2 | sort

Sed confuses me more than awk but you're right. That would also remove the only use of awk in my makefile (sed is there already for hacking around spaces in filenames).

Whitespace padding output in sed is probably horrible, column looks simpler than printf via bash or trying to use make's $info.


Whilst acknowledging that "Confused by SED" has overlap with "have used SED for 40 years and have three books purely on SED" I can recommend

https://www.grymoire.com/Unix/Sed.html

as a reference some might occasionally swear by.

    Anyhow, sed is a marvelous utility. Unfortunately, most people never learn its real power. The language is very simple, but the documentation is terrible. The Solaris on-line manual pages for sed are five pages long, and two of those pages describe the 34 different errors you can get. A program that spends as much space documenting the errors as it does documenting the language has a serious learning curve.

Appreciated, reading through it. I suspect the majority of the sed experience can be attributed to it using "posix regular expressions" by default. It was about a decade after first discovering sed that I realised passing -E was really important.

It is difficult for newcomers to guess that "extended regular expressions" refers to the barely-usable subset of "regular expressions" and "posix regular expressions" are terrible in comparison to either.

edit: alright, yes, one can program in that. Sed can recurse.

  .PHONY: help3
  help3:
   sed -nE 's/^([a-zA-Z_*.-]+):.*## (.*)$$/\1 :\2/ p' \
   $(MAKEFILE_LIST) | \
   sed -E -e ':again s/^([^:]{1,16})[:]([^:]+)$$/\1 :\2/ ' -e 't again '  |\
   sed -E 's/^([^ ]*)([ ]*):(.*)$$/\1:\2\3/' |\
   sort
The first invocation filters out the lines of interest, second one space pads to 16. That works by putting the colon before the help text and repeatedly inserting a space before the colon until there are at least sixteen non-colon characters in the first group.

Composing the -n/p combination with act on everything is a stumbling block for merging the multiple invocations together but I expect it to be solvable.


After a slightly dubious use of time, I can confirm that columns is not necessary. Also noticed that the original version missed double_colon:: style targets. I fear sort is not necessary either but one has to draw the line somewhere.

  HELP_PADDING := 30
  
  .PHONY: awkhelp
  awkhelp: ## Write this help using awk
   @echo "awkhelp:"
   @awk 'BEGIN {FS = ":.*#+"}; /^[a-zA-Z_*.-]+:.*## .*$$/ {printf "  %-'$(HELP_PADDING)'s %s\n", $$1, $$2}' \
   $(MAKEFILE_LIST) | \
   sort
  
  .PHONY: sedhelp
  sedhelp: ## Write this help using sed
   @echo "sedhelp:"
   @sed -E \
   -e '/^([a-zA-Z_*.-]+::?[ ]*)##[ ]*([^#]*)$$/ !d # grep' \
   -e 's/([a-zA-Z_*.-]+:):?(.*)/  \1\2/ # drop :: and prefix pad' \
   -e ':again s/^([^#]{1,'$(HELP_PADDING)'})##[ ]*([^#]*)$$/\1 ##\2/ # insert a space' \
   -e 't again # do it again (termination is via {1, HELP_PADDING})' \
   -e 's/^([^#]*)##([^#]*)$$/\1\2/ # remove the ##' \
   $(MAKEFILE_LIST) | \
   sort

Most "modern" build tools do ruin make. Recently I did this for Go: https://gist.github.com/ceving/edeb6f58429d552e8828a70640db3... But it does not feel right.

Recently I came up with something similar: https://gist.github.com/ceving/cb68c8f2392255c5ed4ea65a6a199...

But I use a alphabet with 32 characters: abcdefghikmnopqrstuvwxyz23456789

I prefer 32 characters, because that makes it possible to pack 5 random bytes into a token with 8 characters.


There was a time where shared libraries were necessary, because otherwise the programs would not fit into memory.


There may still be arguments around shared cache between programs though the security inspired rearranging things might thwart that.

I like static binaries a lot. Whole load of failure modes just gone. Building a clang that targets musl by default on glibc systems is loosely practical these days. That builds self contained binaries that only depend on syscall.

(It took me a few days, a lot of cursing at cmakes ideas about cross compilation and patching trunk slightly, but it can be done and enough of the patches stuck.)


Why not standard conforming SQL instead of MySQL?


No Free Software is communism!

Marx wrote in his [Critique of the Gotha Programme](https://en.wikipedia.org/wiki/Critique_of_the_Gotha_Programm...): [To each according to his contribution](https://en.wikipedia.org/wiki/To_each_according_to_his_contr...).

The original text is: Jeder nach seinen Fähigkeiten, jedem nach seinen Bedürfnissen!

This means you contribute to Free Software as much as you can and you take from Free Software as much as you need.

This is the most ethical way of human coexistence.




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

Search: