8,214 karma · joined Nov 7, 2019 (7y ago) · 5,323 submissions
comment 2y ago · link · parent
for normal/average operating environments, I prefer to just indirect through an extra procedure call, gives you a place to put a breakpoint, and then if you need streamlined performant code you can #define it all away. But, if you plan to #define it all away, make sure that is a regular part of your work flow beforehand. you can have a procedure version, a heavyweight define and a lightweight define (and use your defines inside your procedure to test them there). On a regular basis you need to make sure your infrastructure is all doing what you think it is.
Same is true for main(), use it for setting up infrastructure, have it call Main() which is "your main".
if you are on a large enough project you can budget time for tools, the actual "__main.asm" code that calls C main() is also accessible and you can hook away in there too. Have to do it for all compilers, and track compilers, but on the scale of a large project, that's not the end of the world.
comment 2y ago · link · parent
i'd recommend embracing hungarian naming (if you call it apps-hungarian you've not embraced it fully enough, read older documentation) and be as rigid as rust about using it. i-, c-, p-, and Max are your best friends, don't declare one of those without declaring all the others that you will need.
using hungarian, adopt naming conventions about Open/Close, Init/Finish, Alloc/Free, Start/End, Alpha/Omega, or whatever, and apply them rigidly to any class/struct (with indentation that's obvious). When you put in an Open, you go and put the Close in at that moment, just as you would close any paren you opened. don't return from all over the place in a function, goto endblock and free what needs freeing, you need to work on autopilot not thinking through the twists and turns to play monte carlo with getting it right. If you are going to return an allocation, your name needs to be Open, Init, etc. Use whatever words you want, but it's got to be something that makes you as the caller think "this is an open paren, i need to close it"
using ifdef debug type mechanisms, hook malloc and free and put guard word asserts at the beginning and end of every allocation, and magic number ids and reference counts in all structs, and hook main() and exit() so you check those for leaks. all. the. time.
work in a systematic way that avoids problems and make that your priority, everything else like functionality is slaved to that.
comment 2y ago · link · parent
sounds from this like the people forking basically want a different language, for which they're willing to make a number of breaking changes.
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
(2) Of alcohol made undrinkable, by adding a toxin or unpalatable substance, but still useful as a fuel or solvent. Traditionally by the addition of methanol (wood alcohol) to ethanol (grain alcohol).
https://en.wiktionary.org/wiki/denatured
seems like there should be more information here, but I didn't look
comment 2y ago · link · parent
the numerator is also "wrong"; of his 3 errors, 2 of them are wrong only "off by one" in the last digit, same direction both times, so without understanding the rounding rules in effect it's hard to know whether what happened is an actual error. ln(7) is a mess though but still at the least significant end.
comment 2y ago · link · parent
https://archive.ph/https://www.nytimes.com/2023/12/31/books/...
comment 2y ago · link · parent
I wonder if it would be simple ot add a sensor to measure that across the keyboard, and then have it do double duty as aftertouch (aftertouch is an effect that measures if you "wiggle" a key after you've pressed it down) Then his DX9 could be better than the DX7 :)
comment 2y ago · link · parent
edit doh! I translated the text snippet in the title field, "Christian LDS Temple Calendar". The picture of the LDS Temple might have been a clue
Month View - Each page has a large block of one week per line, highlighted weekends, and a notes field, allowing you to view one month. Generous size - 21.59 x 27.94cm when closed and expands to 43.18 x 27.94cm when opened. HIGH QUALITY PAPER - Printed on high quality paper that is resistant to ink stains. No holiday confusion - Comprehensive coverage of Japan's major holidays and phases of the moon. Extended Coverage - From January 2024 to December 2025, with an additional 6-month extension until 2026. FSC - Our products undergo a rigorous process and are FSC certified. ECO-FRIENDLY - Today's calendars are made from highly recycled paper. We attach great importance to environmental safety and social responsibility.
comment 2y ago · link · parent
no, not a clone, xenix was licensed unix v7, licensed from AT&T. They did not have a license to use the trademark unix, so they called their version xenix.
unix was already widely available when Linus started tinkering, he wanted to play with source, and BSD's were still tangled up in copyright. Had closed source Windows been based on unix, linux's open source hegemony would have toppled Windows too
comment 2y ago · link · parent
BBedit, ELI5, what am I missing?
I know it's been popular a long time but I don't know what it does/why people like it so much
comment 2y ago · link · parent
comment 2y ago · link · parent
in most industries, the fat part of the market is the lower end, so your smallest cheapest product is your biggest seller. McDonalds sells more regular hamburgers than they do Big Macs. BMW sells more 3 series than they do 7 series.
There are many other factors that go into selecting the brand of the next plane you buy than simply "zomg they made a mistake".
Boeing still has a leading technology and engineering position in the aerospace field, and their product line overall is a very good fit for what many carriers need to buy. This problem of some loose bolts is easily remedied, and is just not a dealbreaker. despite an exaggerated title, TFA is very light on making any case that there's a set of deep problems inside Boeing that rise to any level of statistical significance. A software problem and some loose bolts.
comment 2y ago · link · parent
immediately escorting somebody off the premises seems more likely to trigger such gun violence than avoid it.
in any case, gun violence remains a very unlikely event wrt to the headlines it receives (divide the statistics by "out of 335 million people")
comment 2y ago · link · parent
I had another idea about it and I'm wondering what other people think: by buying Twitter/X, Musk has waded deeply into the culture war, and we see on HN plenty of people who just can't stand to see his name. It seems a sizable community, could the supposed downward trend in the industry simply be a lot of refusal to buy Teslas? It would not necessarily reflect directly in Tesla sales because reduced demand for Teslas could be made up on margin by other undecided EV brand buyers seeing more availablity of Teslas and switching because they feel Tesla is an upgrade. In a like manner, some of the former Tesla buyers might not be willing to downgrade from a Tesla, so they hang on to their car longer, get a hybrid, etc.
comment 2y ago · link · parent
there was also prison time. FTA:
Several of the executives and employees were arrested and convicted on federal charges. One executive, security head Jim Baugh, got nearly five years in prison. The company's CEO at the time, Devin Wenig, was referenced, but not by name, in federal charging documents. He was never charged, but did lose his job. In addition to Baugh, former head of security, the convicted eBay minions are:
David Harville, former Director of Global Resiliency, who was sentenced to 24 months in prison in September 2022; Stephanie Popp, former Senior Manager of Global Intelligence, who was sentenced to 12 months in prison in October 2022; Philip Cooke, a former Senior Manager of Security Operations, who was sentenced to 18 months in prison and 12 months of home confinement in July 2021; Stephanie Stockwell and Veronica Zea, a former Manager of Global Intelligence and a contract intelligence analyst, respectively, who were each sentenced to one year in home confinement in October and November 2022. Brian Gilbert, a former Senior Manager of Security Operations, has pleaded guilty and is awaiting sentencing.
comment 2y ago · link · parent
You triggered me to remember additional elements of my idea. the 80's saw the arrival of the CD-ROM, and I thought "Consumer Reports can't publish a detailed chart of everybody's taste, but I'll bet their movie voting database would fit on a CD-ROM, and a piece of statistical software could figure out what movies each person would like." But I didn't think people would pay enough for the service to get a new CD-ROM in the mail every month, and if it didn't stay up to date with the latest VHS releases :) it wouldn't be useful, and Consumers Union was such a ... purist/hairshirt type organization how could anybody even work with them.
comment 2y ago · link · parent