Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
chubot
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
90 ms
·
961.
▲
by
chubot
4y ago
That ship has sailed, because busybox ash and dash continually implement some of bash features and semantics, which come from ksh. And OSH implements almost all of bash That is, The posix shell spec is missing a lot of reality. It’s not ve
962.
▲
by
chubot
4y ago
Yeah that is interesting ... I guess it's because Zig compilation is single-process, parallel, and threaded, not like the C++ compilation model of separate processes? I never tried, but I highly doubt either gcc or Clang could be built
963.
▲
by
chubot
4y ago
The problem is evolving the interpreter in a way that doesn't break bazillions of third party bindings -- Win32, OpenGL, Fortran for NumPy/Pandas, databases, GPUs, every C and C++ library ever, etc. Python's C API exposes ref
964.
▲
by
chubot
4y ago
JavaScript doesn’t have a C API, that makes all the difference
965.
▲
by
chubot
4y ago
That was also echoing through my brain while reading through the comment (worked there awhile ago) It would be crazy if someone just shook up the whole company top to bottom, but google is still making money and apple wasn’t So I think it w
966.
▲
by
chubot
4y ago
I'd say there was high variance in the past, like there is today But the diet that Americans eat today is worse than that of the past, adjusted for income i.e. we are > 1000x wealthier now, but eat poorer quality food than somebody
967.
▲
by
chubot
4y ago
Yeah my original statement was overly strong -- I was really referring to the subset of people who already found that "carbs" make them sick, and contort their diets as a result. I believe the most salient issue, the most predicti
968.
▲
by
chubot
4y ago
I would think of "corn" as a very overloaded word It wouldn't make economic sense to use the same thing for corn on the cob vs. doritos / Frito Lay vs. high fructose corn syrup, and it likely isn't In the last case,
969.
▲
by
chubot
4y ago
It obviously varies ... Kids seem to love it / thrive on it -- look at a typical 2 year old with mac and cheese or Costco pizza :) I think as adults people tend to not be able to metabolize that kind of diet. In populations, it repea
970.
▲
by
chubot
4y ago
Ancient/authentic wheat varieties taste amazing !!! I like millet, einkorn, wheat berry, rye berry, kamut, etc. I get them at the farmer's market. Totally worth it This was a revelation in taste and health in my 40's :)
971.
▲
by
chubot
4y ago
Link?
972.
▲
by
chubot
4y ago
It looks like it relies on BtrFS? Can anyone add support for OverlayFS 2? :) which I think is more deployed these days due to Docker itself I’d be curious to see how it looks
973.
▲
by
chubot
4y ago
Building a system that allocates memory once up-front requires up-front thinking. sqlite apparently has some support for this, although of course you make it more predictable if you control all the code. https://www.sqlite.org
974.
▲
by
chubot
4y ago
I thought Jai was dead since there’s no code and very little info other than video about it But apparently it is being used in closed beta
975.
▲
by
chubot
4y ago
BTW I ONLY use egrep and fgrep !!! - egrep means [0-9]+ works like in Perl/Python/JS/PCRE/every language, not [0-9]\+ like GNU grep. - egrep syntax is consistent with bash [[ $x =~ $pat ]], awk, and sed –regexp-extended
976.
▲
by
chubot
4y ago
This comment sums it up best: https://news.ycombinator.com/item?id=33142349 So basically, use EITHER idiomatic C, which means long functions / few internal interfaces, reuse with ABIs not APIs, bespoke data structures
977.
▲
by
chubot
4y ago
It's not either-or, both things can be true There are apps where absl:flat_hash_set isn't optimal either
978.
▲
by
chubot
4y ago
Again, there is already a well known solution for this problem -- C++ And it's trivial to upgrade to from C So basically, use EITHER idiomatic C, which means long functions / few internal interfaces, reuse with ABIs not APIs, besp
979.
▲
by
chubot
4y ago
Maybe, I'm not seeing it from those links Either way, it doesn't really matter, as it's clear that C does not include any of those ideas, and the CII style isn't idiomatic Especially when it was created, but even today!
980.
▲
by
chubot
4y ago
You could view it as an example not meant to be used, sure I'd say it's still easy to get the wrong idea -- the title is "C Interfaces and Implementations: Techniques for Creating Reusable Software" So the claim is that
981.
▲
by
chubot
4y ago
I don't have any problem with ADTs or abstraction ... In fact I'd say the strength of C++, and why I use it, is precisely that you can create your own abstractions, more so than C. I'm just saying that using a canned set with
982.
▲
by
chubot
4y ago
citation needed We're talking about abstract data types Common Lisp yes, and its research predecessors, but not Lisp in 1972 CLU itself was based on Algol, and influenced C++
983.
▲
by
chubot
4y ago
typo: It's a minimal layer meant to generate machine code that will work on multiple different machines i.e. it's about code generation, not abstraction, not type checking, etc.
984.
▲
by
chubot
4y ago
Yup, same! And I just looked it up -- C was invented BEFORE abstract data types were! This explains a lot. Programmers think "hash table", stack, queue, set, etc. are "the way you program", because that's how it&#x
985.
▲
by
chubot
4y ago
I wouldn't recommend it for that (see sibling comment). Reuse isn't as idiomatic in C as it is in other languages, for reasons inherent in the language, e.g. see all widely used C codebases
986.
▲
by
chubot
4y ago
I read the Hanson book ~10 years ago (he was briefly a coworker). It's interesting, and maybe worth checking out for experienced programmers, but NOT for someone who wants to learn C in 2022 and be productive. The style doesn't m
987.
▲
by
chubot
4y ago
A short answer would be that dozens of projects like this already exist and have existed for decades (scsh was mentioned in this thread), and they aren't widely used as shell replacements: https://github.com/oilshell&#x
988.
▲
by
chubot
4y ago
Addendum: You need shopt --set oil:upgrade strict:all to catch this, or just use Oil. Demo here: https://news.ycombinator.com/item?id=33122256 They're separate things because introducing MORE error handling can make y
989.
▲
by
chubot
4y ago
ShellCheck is great, but since it works on syntax, it can't catch problems that can only be determined at runtime, like "if myfunc" with set -e on. Example here: https://news.ycombinator.com/item?id=33122256
990.
▲
by
chubot
4y ago
it's never had an option to make "-e" do the obviously natural behaviour,, This is harder than it sounds! :) There's arguably not a natural behavior for shell, because $? is overloaded in Unix. It can mean success&
More ›