Rural America Doesn't Have to Starve to Death - <AUTHOR> https://www.thenation.com/article/economy/big-agribusiness-finance-farming/ <comment><USER2> This seems like the same Grapes of Wrath style argument we've been seeing since the 50s. Except the author re-frames it as if the CAFOs, greedy banks, and tax havens are completely to blame for the collapse of small farmers. But to me this seems like an inevitability of the market; these small farmers are operating inefficiently, that's why they can't compete with the factory farm prices...

<comment><USER3> Nothing is inevitable. We're not slaves to the market. If the market means small farmers can never be as efficient as factory farms and finance, and may not have any place in the economy at all without contracting out all aspects of their farms and losing their standards of living - then F the market.

Sometimes we need to step back from these abstract principles and ask ourselves if we want to live in that kind of world. I'd rather have a country where normal people can farm, animals can live good lives, and we have values other than prostrating ourselves before the altar of GDP.

<comment><USER4> Why should the rest of the country subsidize people who want to live the farming lifestyle?

Btw, hobby farms are a thing. If you want people to be able to pursue hobbies in liu of work, you need a UBI. (Although, a smaller UBI would be suffient to allow for nearly viable hobbies like farming)

<comment><USER5> Why should the country subsidize suburban areas?

<comment><USER4> It shouldn't. Suburban sprawl was one of the major "blunders"[0] of domestic policy in the US. There is even less of an argument to be had here. At least rural subsidies can be thought of as the government paying for an overcapacity of food.

[0] scare quotes because it was fairly succesfull in its goal of segragation.

</comment></comment></comment></comment></comment><comment><USER6> I've lived in small towns most of my life, I know more farmers and ranchers than anyone, and in short there isn't much that can be done. They vote for politics that support large corporations and deregulation which allows them to be beat up by larger conglomorates. They fight innovation to the point that new technology isn't adopted till a son takes over. But most of all, the one thing that would likely make them more profitable would be to go towards a higher quality but lower quanity crop (like going organic) but they fight that too.

Right now rural america is basically subsidised by the cities and has 3x the voting power of those who live in them. This model isn't sustainable unless the three things listed above start to change. But they won't.

<comment><USER7> Politically, the solution is to offer them candidates who are are conservative on all issues except corporate regulations.

This is what FDR did: went left on economic issues, and right on everything else: law and order, pro-military, anti-civil rights, etc. His "brain trust" and bureaucratic supporters came from the upper class (something rural citizens support).

</comment></comment><comment><USER8> Despite the clickbait title (no, no one is starving), makes some good points.

</comment><comment><USER9> This article suggests that the answer is to regulate/break up Big Finance and then the farming problems will just take care of themselves, and farmers will stop doing "unsavory" things like voting for Donald Trump. Right.</comment>


How WhatsApp Needs to Improve Its Encryption - <AUTHOR> http://blog.nadim.computer/post/115940264683/how-whatsapp-needs-to-improve-its-encryption <comment><USER2> >Anyone who replaces your public key in transit obtains immediate decryption.

Actually, you would have to _spoof_ the public key, not just replace it, otherwise it's not actually an end-to-end system. Seems like doing the key verification step on the server is how the author describes it, which would very much not be secure in any world. Is that what the author is claiming?

If there are devices using the network that aren't capable of PKI, which seems dubious given how ubiquitous PGP is, then they have a major vulnerability.

Given that they own the native app development, and aren't using a browser for example, I see no reason why WhatsApp wouldn't be able to implement true end- to-end on any device that had capable hardware - unless it was engineered specifically to be able to break the encryption chain.

What am I missing here?</comment>


Seven months later, what we know about Covid-19 – and the questions that remain - <AUTHOR> https://www.statnews.com/2020/08/17/what-we-now-know-about-covid19-and-what-questions-remain-to-be-answered/ <comment><USER2> This is a nice overview that I will keep and send to people while it's still relevant. I recently did a small amount of traveling and got to speak with a couple strangers in person during my travels. The amount of misinformation floating around regarding the virus in more rural areas of the US is staggering. Most people in the city seem to have some grasp of the magnitude of the issue and the various risks but out in the countryside I heard all manner of complete misinformation.

<comment><USER3> What, would you say, are the most common misconceptions among these rural people?

<comment><USER4> Not sure about the OP...but based on my observations this is the main misinformation I hear.

1) Masks, They are viewed as a violation of their "rights", do more harm than good, make people not be able to breath, feed the virus back into you.

2) Fake news: The whole thing is fake. Nobody is getting sick. No worse than a cold. Just a flu.

3) Social distancing: Don't need it. It is harming businesses and therefore should be ignored. Violation of my rights.

Those are the main ones I really see in my area. My city is on the edge where rural begins. Also, 52% registered Republican last I checked...not saying that has anything to do with it but I have never once in my life observed so many locals out protesting as I did when they made a mask mandate.

[https://cdapress.com/news/2020/jul/23/mask-up-kootenai- count...](https://cdapress.com/news/2020/jul/23/mask-up-kootenai-county-5/) Pictures here pretty much show the most common misinformation I see/hear but in sign form.

edit: forgot a word :)

<comment><USER2> I heard a LOT of number two. People I spoke to in more rural areas seemed to downplay the risk a lot. Most people seemed to acknowledge the reality of the virus but leaned heavily on talking points that downplayed either the morbidity of the disease or their risk of contracting it.

Of course, if you live in rural areas there is some reality to the notion that your chance of contracting it is less, but if you're talking to a complete stranger from the city (me) it dismantles that idea pretty quickly.</comment></comment></comment></comment>


Richard P. Gabriel: The Art of Lisp & Writing - <AUTHOR> http://www.dreamsongs.com/ArtOfLisp.html <comment><USER3> "The difference between Lisp and Java, as Paul Graham has pointed out, is that Lisp is for working with computational ideas and expression, whereas Java is for expressing completed programs. As James says, Java requires you to pin down decisions early on. And once pinned down, the system which is the set of type declarations, the compiler, and the runtime system make it as hard as it can for you to change those assumptions, on the assumption that all such changes are mistakes you're inadvertently making."

Lisp vs Java is one thing but there is an undercurrent of "static typing is terrible" running through this paragraph (and others). I am not sure I agree. Haskell for example is very expressive(at least to me). And I am not sure a static type system gets in the way of "prototyping" much.

"Lisp, of course, and especially Common Lisp are my languages. Not since the 1960s have I programmed professionally in a language other than Lisp."

With all due respect to Richard Gabriel, (and this probably blasphemy) perhaps he should? Haskell or Erlang or Factor are mind expanding in ways Common Lisp never was. (Not to deride Common Lisp, but I am tired of people implying it is some kind of unsurpassed acme of language design excellence)

<comment><USER4> >"Lisp, of course, and especially Common Lisp are my languages. Not since the 1960s have I programmed professionally in a language other than Lisp."

> With all due respect to Richard Gabriel, (and this probably blasphemy) > perhaps he should? Haskell or Erlang or Factor are mind expanding in ways > Common Lisp never was.

The fact that Gabriel hasn't "programmed professionally" in those languages does not imply that he doesn't know them.

<comment><USER3> "The fact that Gabriel hasn't "programmed professionally" in those languages does not imply that he doesn't know them."

Fair enough but it doesn't mean that he does either, at least to a high enough degree where he can make an unbiased comparison to CL.

And his writing _on this essay_ (which in my opinion is a rather incoherent and wandering paean of praise for lisp vs a strawman Java) seems to indicate he doesn't.

<comment><USER5> Richard P. Gabriel lost his Lisp business when he invested in creating a new C++ development environment and used his existing Lisp business to get some money for that.

He spend a lot of time & money into getting this C++ thing going - not as a programmer, but as a boss of a software company.

That's also why Lucid Emacs got forked - which then became XEmacs.

</comment></comment></comment></comment><comment><USER6> It really irks me when people misrepresent the discovery of quantum effects as some kind of science-shattering event that overturned everything we knew, setting scientists kicking stones for the next 80 years. But it's a whole new level of wtf to say, "at least opening the door for a new kind of formulation (other than mathematics) for describing the truth about reality."

What?

Otherwise, good article.

<comment><USER7> That and the line

"Scientists, though, perhaps because of their desire for accuracy and precision have had the worst luck of all in pinning down the truth of the universe."

convinced me it would be a waste of time to continue with the article.

</comment></comment><comment><USER8> I'm pretty sure that Lisp isn't as worthy as Gabriel paints it, for this simple reason: We grasp the static-verse more readily than the dynamic.

At most levels of work, we aren't actually making enormous changes all at once - even in the writing analogy, a story has to be written one sentence at a time, and if the concepts start changing partway through, the rewrite has to be done....one sentence at a time. The breakthrough concept that turns everything on its head is usually itself just one sentence.

In programming, we change two lines and then run the program again, we build on known, tested libraries and languages, we develop a concept on paper and then implement it. And because these things are built on a small foundation of logical concepts, we can build the language to ensure ever-greater levels of self-consistency that would otherwise only be manifested at runtime.

Feedback loops.

The fiction writer has a short feedback loop - the "state" of a story is small - no explosions of complexity as one would get with loops or recursion - <USER2> its progression can be kept in her head.

The programmer has a longer feedback loop, because her expectation is not to maintain the entire progression of the program in her head, but to let the computer do it and then display the results in some manner.

Dynamicness optimizes the feedback loop for greater incrementalism: the program runs until it hits any one point where an irreconcilable error is encountered, and then multiple options are available to fix the error and even let the program continue.

Staticness optimizes the feedback loop for "batch" error-checking: the programmer writes a full body of code she thinks is correct, with no run/test cycle to speak of, and then gets all the errors at once. When the program compiles, it works.

Since we can't implement either ideology perfectly, it's probably best to have some of _both_.

</comment><comment><USER9> > ". . . most design problems we face in creating software can be resolved > only through experimentation with a partially running system. Engineering is > and always has been fundamentally such an enterprise, no matter how much we > would like it to be more like science than like art."

This is not a very good way of putting it. The essence of engineering is determinate knowledge, i.e. scientific, logical knowledge. That is not to say it excludes other things, or that that essence alone is sufficient, just that it is the definitive, distinctive, fundamental feature.

Experiment produces determinate knowledge -- the most specific, detailed kind. Scientific research produces the broad, general know-how, and experiment fills the gaps for a particular task. If engineering were not fundamentally about determinate knowledge, then experiment could not work. The knowledge produced by the experimental trial would not even have the generality to transfer to the intended use.

Associating engineering and software with art seems of little value. From what I remember of aesthetic philosophy, art does not have substantial, useful, or perhaps any correspondence with engineering -- let alone the vagueness of what art is anyway. One cannot fault the real content of the article, but the arty leaning is ultimately empty.

The limit of engineering is evolution, not art. When there is no knowledge, engineering design can't work, and instead evolution is the way. Proof of the effectiveness of that alternate approach is all around.

</comment><comment><USER10> An old article, but a great read. Tying together writing and programming Lisp is insightful and if I could extend his ideas a little: writing using a light weight but very powerful tool like Latex seems similar to programming in a Lisp environment that may also be powerful but after a learning curve, the language and environment stay out of your way. Writing with Latex seems that way to me.

<comment><USER11> > writing using a light weight but very powerful tool like Latex

Can you please explain in what way LaTeX is lightweight? IIRC, LaTeX is a macro layer above TeX which is a layer above something written in "web" which (don't know the details here, but) I think may be translated to C (web2c) for building.

Also, last time I looked, the Texlive distribution is something like at least 100 MB.

<comment><USER10> Light weight in the sense that adding Latex formatting to a text document is easy and does not (much) get n the way of writing. Also, moving material around, referring to figures, sections, etc. is all easy. I have not tweaked my Latex setup in a long time.</comment></comment></comment>


PHP to deprecate MySQL extension - <AUTHOR> http://marc.info/?l=php-internals&m=131031747409271&w=2

<comment><USER3> Yes, yes, yes a million times yes. Every person starting PHP should be taught PDO with parameterized queries from the get go. The internet (and many respectable CS courses) are littered with examples using mysql_query() and string concatenation, half of which train people to create SQLI bugs or don't explain why escaping is needed; it's too late to undo the damage already done but at least people new to PHP will hopefully be told now that there is a better way.

If we had trained people to simply do

        $sth = $dbh->("INSERT INTO folks (name, addr, city) values (?, ?, ?);");
        $sth->execute(array($name, $addr, $city));

in 2005, when PDO first came out, uncountable SQLI bugs would have been avoided, and maybe lulzsec wouldn't be having such a field day in 2011...

<comment><USER4> Even that way is kinda fragile and fugly, though. I always recommend:

      $stmt = $somePDOObject->prepare("INSERT INTO folks " .
        "(name, addr, city) values (:name, :addr, :city);");
      $stmt->bindValue(":name", $name);
      $stmt->bindValue(":addr", $addr);
      $stmt->bindValue(":city", $city);

Slightly more verbose, but it has the upside of being more resilient.

<comment><USER5> If you go the resilient route with _everything_ you end up with code that looks like Java code. It's not usually worth it, as when the query changes, odds are you'll be looking at the parameters, and will notice changes. Not true for large queries, of course, but for beginners? They're writing things like the above, where the entire process fits in a single eyefull. Making it more verbose from the get-go means they're more likely to just concatenate strings.

<comment><USER6> > If you go the resilient route with everything you end up with code that > looks like Java code.

Meh. Prepared statements are useful when you'll use the it multiple times through rebinding, and for one-shots it's easy enough to have a function taking a parameterized query and an array and doing the annoying crap internally.

Then you just write:

        $result = executeSQL($somePDOObject,
            "INSERT INTO folks (name, addr, city) values (:name, :addr, :city);",
            array("name" => $name, "addr" => $addr, "city" => $city);

<comment><USER4> This is actually fairly close to what I do in my own code (I actually extend the PDO object, but same idea). The example I gave was just using the base PDO library instead.

</comment></comment></comment></comment></comment><comment><USER7> I was having a hard time loading it, so in case it goes down, here's the text:

Greetings PHP geeks,

Don't panic! This is not a proposal to add errors or remove this popular extension. \ Not yet anyway, because it's too popular to do that now.

The documentation team is discussing the database security situation, and educating \ users to move away from the commonly used ext/mysql extension is part of this.

This proposal only deals with education, and requests permission to officially \ convince people to stop using this old extension. This means:

\- Add notes that refer to it as deprecated \- Recommend and link alternatives \- Include examples of alternatives

There are two alternative extensions: pdo_mysql and mysqli, with PDO being the PHP \ way and main focus of future endeavors. Right? Please don't digress into the PDO v2 \ fiasco here.

What this means to ext/mysql:

\- Softly deprecate ext/mysql with education (docs) starting today \- Not adding E_DEPRECATED errors in 5.4, but revisit for 5.5/6.0 \- Add pdo_mysql examples within the ext/mysql docs that mimic the current examples, but occasionally introduce features like prepared statements \- Focus energy on cleaning up the pdo_mysql and mysqli documentation \- Create a general "The MySQL situation" document that explains the situation

The PHP community has been recommending alternatives for several years now, so \ hopefully this won't be a new concept or shock to most users.

Regards, Philip

</comment><comment><USER8> Would like to see the same for the 'memcache' lib, which is way older and slower than 'memcached'. The older lib comes up first in most search results and there's no real way for a new PHP user to know the difference.

<comment><USER9> The problem is that the newer/better extension, memcached (<http://php.net/manual/en/book.memcached.php>) relies on libMemcached (<http://libmemcached.org/>) and they won't release a Windows DLL for it (Google "libmemcached windows", the ensuing confusion is just the tip of the iceberg.) Until you can get PHP's memcacheD extension running on Windows boxes, there's no point to thinking about deprecating the memcache lib.

Sure nobody is really running any PHP sites on Windows boxes, but they're sure as hell developing on them. And while I get that the core PHP devs couldn't find a Windows machine if their lives depended on it, enabling coders on Windows machines is what brought them to their current size - <USER2> they've clearly forgot since <http://pecl4win.php.net/> died.[/endrant]

<comment><USER10> I honestly don't understand why anyone would develop on Win and release on Linux, especially for a web-app.

VMWare Player and VirtualBox are free, and it's quite easy to setup an Ubuntu image that mimics your server platform (if you must be untethered)... alternatively put everything in the (private, if need be) cloud.

<comment><USER9> Once you've had a change to run in that kind of environment as a full-time job for 40+ hours a week, let me know...

<comment><USER11> I've been developing in a similar environment for over a year now. I have a linux VM running apache + associated software, with Samba running. I mount my code as a shared drive, and edit it that way. This means I get the power of linux + linux tools, but I can still run Windows as my primary OS.

I am perfectly happy with this setup, and haven't run across any downsides.

</comment></comment></comment></comment></comment><comment><USER12> @mildweed: the title here is total clickbait. They aren't deprecating anything right now, it's not MySQL but ext/mysql (one of 3 possible mysql libs).

please remember in the future to do that better.

<comment><USER6> > They aren't deprecating anything right now, it's not MySQL but ext/mysql

MySQL is the "human-readable" name of ext/mysql.

Source: PHP's documentation <http://www.php.net/manual/en/mysqli.overview.php>

<comment><USER12> I see your point but you're nitpicking. MySQL is also the name for the database product, and so it's easy to read this and think that PHP are getting out of the business supporting MySQL.

<comment><USER6> > MySQL is also the name for the database product, and so it's easy to read > this and think that PHP are getting out of the business supporting MySQL.

No, I don't think it is because it makes no sense at any level of resolution. MySQL is by a very long shot the most common pairing for PHP data persistence, unless the project is taken over by Microsoft (and drops support for anything but MSSQL) there's no way for such a thing to happen.

It simply is not a sensible interpretation of the headline.

<comment><USER13> Well, it's not a sensible thing to do, but it's a perfectly reasonable interpretation of the headline. That's why it's link bait.

[edit] fixed a typo

<comment><USER14> This is spot-on, and it's a shame nobody seems to care.

<comment><USER13> Well, somebody cares, if downvotes mean anything.

<comment><USER15> If only we could see the fucking points.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER16> This is the kind of mess when you have 5 different libraries to do the same thing. PHP should never have allowed there to be multiple MySQL, Mamcache, etc. extensions.

Instead, they should have introduced the new libraries in a big version bump, and immediately deprecated the old and unsafe libraries. A couple languages / frameworks that are good at doing this is Apple with Cocoa, and Ruby / Rails.

<comment><USER17> And thus ensured that either you upgrade your version of PHP and instantly break your application, or that you stick with an older version with potential security flaws, and never bother updating again?

Bonus points if you're not actually in control of the version of PHP your web app runs on.

<comment><USER16> Being forever backward-compatible is a curse that prevents innovation and makes you end up with the mess of a language that PHP is.

<comment><USER17> I agree, but you don't have to be backward-compatible forever - you can deprecate features gracefully.

</comment></comment></comment></comment><comment><USER18> Definitely a step into the right direction! It's just scary how many bad developers are passing unescaped values into SQL statements.

I remember one guy who was a PHP developer at the company for years. He was really good at it though. However during my apprenticeship I asked him about best practices querying databases and showed him my code. Looking at it he said: "Why the hell would someone escape those values? It's a database, not the Pentagon."

<comment><USER3> I think people need to be educated that SQLI bugs (errors in escaping) lead to usability issues as well as security issues. I can't count the number of times I've searched for something on a clearly handmade site and watched in amusement as my search query grows backslashes while paging through the results. Also, single quotes show up in more places than people realize: I've seen them in proper names, street addresses, uploaded filenames... if those things break your app or damage data, that _should_ be a tangible concern.

<comment><AUTHOR> And my favorite place, email addresses. Valid. Rare, but valid.

</comment></comment></comment><comment><AUTHOR> This seems like a relevant time to have a discussion on the merits of PDO vs mysqli. Help all those who need to get off of ext/mysql make an intelligent decision on where to go next.

I'm less interested in features (data layer abstraction) and more interested in performance and security concerns.

<comment><USER6> > I'm less interested in features (data layer abstraction) and more interested > in performance and security concerns.

They both offer the same security (though I believe mysqli offers more rope to hang yourself with, and PDO's API is simpler and smaller).

In the past, mysqli had the performance edge. It's probably still the case, since PDO is db-independent (PHP bundles a dozen of PDO db drivers in the standard distro) whereas mysqli is db-specific. Mysqli will also offer access to more db-specific features if mysql.

PDO has ditched the procedural style entirely (no PHP4 compat), has a smaller API and lets you use the same API for different DBs (across projects, so you'll hit a MySQL and a Postgres db using roughly the same query API).

<comment><USER19> Sorry if this is a silly question but where does MDB2 fit into all this? <http://pear.php.net/package/MDB2> It looks like it uses mysqli already, is it superseded by PDO?

<comment><USER4> MDB2 has basically been supplanted by PDO, yes.

</comment></comment></comment></comment><comment><USER18> As a person who teaches PHP (and probably other languages too), you should definitely tell people not to do following mistakes:

      mysql_query("INSERT INTO table(field) VALUES('".$_POST['input']."')");

and not to forget, a truly classic one:

      include('pages/'.$_GET['page']);

When I started to learn PHP there was a contest between the students: Who brings hosts with vulnerable websites down faster. The trick was to recusrively include the same page (like index.php for example). The most funny thing though was to see the explosively rising load average by including /proc/uptime.

After having some fun, we usually sent emails to the administrators just to not receive any answers and to find the hosts still vulnerable months later...

<comment><USER17> I would consider e-mailing the administrators an e-mail with something along the lines of "<img src='<http://vulnerable_host/?page=/proc/uptime> />"

"The call is coming from inside the house!"

<comment><USER18> It was much more fun to send them their own /etc/motd!

</comment></comment></comment><comment><USER20> I've never understood why you can't write secure code using string concatenation. It seems to me like all it takes is a reliable "quote" method (with proper escaping of course), and the discipline to use it on _all_ variables that go into a query. The advantage is that queries are sometimes easier to read and maintain when they're written locally like this, without having to jump down to another line to see what a placeholder will actually contain.

I concede of course that this can't work unless there is absolute discipline in a project to quote absolutely all variables, whether you think they are trusted or not.

Am I missing a key point here?

</comment><comment><USER21> I wished there was a new PHP syntax that would escape strings before substituting them. Like this:

escaped_query="INSERT INTO t (a,b) VALUES ('$!some','$!thing');

The "!" means "escape this variable".

That would be the easiest way to create queries with escaped parameters.

<comment><USER22> I've experimented with a variation of this.

Something like ...

      foreach($_REQUEST as $k=$v) {
        $REQUEST[$k] = mysql_real_escape_string($v);
      }

      $query = "INSERT INTO table VALUES('$REQUEST[email]', '$REQUEST[name]')";

Problem is, this only works if you don't plan on modifying any of the values before you stick them in the database.

You could also do something like ...

      $query = "INSERT INTO table VALUES('{$e('email')}', '{$e('email')}')";
      $e = 'esc';
      function esc($v) {
        mysql_real_escape_string($v);
      }

But I think that looks pretty ugly.

<comment><USER21> Hey, the {$e('$value')} idea is interesting.

old way:

      $sql_email=mysql_real_escape_string($email);
      $sql="UPDATE t WHERE id=123 SET email='$sql_email'";

your idea:

      $sql="UPDATE t WHERE id=123 SET email='{$e($email)}'";

Im not yet sure, which one I like more.

</comment></comment></comment><comment><USER23> "to do that now"?... What would be a good time to break the majority of smaller sites on the Internet?...

<comment><USER24> There are tons and tons of hosts that still haven't upgraded to 5.3 - if the change comes in 5.5 or 6, it'll easily be 3+ years before it starts to be an issue.

<comment><USER17> I know for a fact that my old employer has one client who's still running 4.0, unless they've decided to pay out the ass to upgrade their spaghetti-coded system.

Considering that a) no out-ass money has been offered me, and b) I'm effectively the only person who could even fix bugs in the system, they're still running 4.0.

<comment><USER25> Reminds me of some places I've worked in my time. Clients made one site and wouldn't pay for an upgrade, and the folks running the company learned PHP when version 5 was brand new, and never wanted to upgrade because of a combination of clients not willing to pay and "seeing no need to upgrade".

Most of them are amazingly still in business, and their clients sites are still amazingly vulnerable. And we wonder why PHP has such a bad rep.

</comment></comment></comment></comment><comment><USER26> I am both amused and horrified by the reluctance of developers to officially deprecate the extension. One post even suggested introducing E_NEARLY_DEPRECATED to handle this situation. Why can't people simply say, straight-up, that it is deprecated, and acknowledge that that means that it shouldn't be used in new code? It's not that big of a deal, is it?

<comment><USER27> The problem is that this would be one of the most widely used PHP extensions being deprecated, so they're just being careful. This is not the normal way things are deprecated, but education is a good way to start the process of removing popular functionality from such a popular programming language.

<comment><USER28> Exactly. For something like ereg, it was a lot easier to just deprecate it and go from there. For mysql, it's such a commonly used extension that a softly, softly approach is needed, no matter how much it would be nice to get rid of it immediately.

<comment><USER29> If they do actually add E_DEPRECATED to mysql/ext they will probably have a really hard time every depreciating anything ever again.

mysql/ext is so popular that all default installations will start hiding E_DEPRECATED, which means that no one will ever again see depreciated warning even for things that are easy to fix.</comment></comment></comment></comment>


Chinese tech maker LeEco has been quietly infiltrating Silicon Valley - <AUTHOR> http://www.theverge.com/2016/10/19/13324210/what-is-leeco-chinese-tech-company-US-launch <comment><USER2> Giving a -404 on your home page (as indexed by DuckDuckGo) is not a good look:

[http://www.leeco.com/index.html](http://www.leeco.com/index.html)</comment>


Show HN: I improved browsing ThemeForest (Weekend Project) - <AUTHOR> http://themesea.net/

<comment><USER2> Looks good. I like that you provide an API that supplements Envatos (seriously lacking) API. That was the biggest irritation I ran into while building ThemeSquirrel.

Good work!</comment>


SUVs conquered the world – at the expense of its climate - <AUTHOR> https://www.theguardian.com/us-news/2020/sep/01/suv-conquered-america-climate-change-emissions <comment><USER2> I really wish that someone would come up with a solution to the public transportation issue in the US. Every time I read an article like this, I just want to throw my hands up and scream "so what do you suggest we do about it?"

I'm all for using public transportation, but I do have to actually go places, and arrive on time, and sometimes I have to bring stuff with me.

And now with COVID, I _really_ don't want to spend any amount of time on a bus.</comment>


Inside the New York Public Library's Last, Secret Apartments - <AUTHOR> http://www.atlasobscura.com/articles/inside-the-new-york-public-librarys-last-secret-apartments <comment><USER2> In the past I would have loved to live in a library, but now I live in a normal house _and_ it doubles as a library with an almost infinite amount of reading material, and you, reading this _also_ live in a library! What times we live in, such luxury. Surely the ancients would have happily done some murdering for this privilege.

As a kid I'd eat my way through the shelves of the library (it wasn't a very big one), anything about physics, electronics, space, crafts and so on. There were days I went twice because I'd finished the books I was allowed to take out on a subject (sometimes only one).

<comment><USER3> >I live in a normal house and it doubles as a library with an almost infinite amount of reading material

Can you flesh this out a little more? I guess maybe it is just an artifact of my getting older, but I still see quite a qualitative difference between the information you can find in books, and that which you can find on the web (text, video, etc.) for subjects which are not computer related. Books seem like they can give you more in-depth treatment than you get with most internet based resources. Part of it may be that there is so much more chaff, that finding the wheat is harder.

<comment><USER2> There are more books and articles on the net than you can read in several lifetimes and most of them are just a google search (allinurl: .pdf) away.

For starters all the scientific papers, all the free books (out of copyright ones) and of course - to set a bad example - the pirated ones. And then there are the commercial suppliers, more like bookstores but the effect is much the same, a kindle is like an infinite bookshelf.

Then there are plenty of sources of information that are not quite books but that collectively add up to an equivalent and sometimes even more.

Subjects which are not computer related are maybe a little bit harder but not that much harder, it would be hard to find a subject that interests me (say, windmills, renewable energy, genetics) that I couldn't fill a reading list faster than I could consume it, assuming I could consume it all.

[https://www.google.com/search?q=allinurl:.pdf](https://www.google.com/search?q=allinurl:.pdf)

Says there are 1.4 billion results, now I'm sure that you should take that with a large grain of salt, for instance plenty of those pdfs are not books at all and there will be duplicates and so on. But if even 1% is unique and useful content that's 14 million volumes. I'm not aware of any normal library that I could have access to having that many books.

<comment><USER3> Can you give us a few of your favorite windmill resources?

<comment><USER4> [https://www.reddit.com/r/Jokes/comments/576kmh/so_two_windmi...](https://www.reddit.com/r/Jokes/comments/576kmh/so_two_windmills_are_standing_in_a_field/)

</comment></comment></comment></comment></comment><comment><USER5> Interestingly, Sharon Washington[1], lived in one of these apartments as a child and wrote a one-woman play[2] about it. It's set to premiere in a few weeks.

[1] [http://www.imdb.com/name/nm0913531/](http://www.imdb.com/name/nm0913531/) [2] [http://www.sharonwashington.com/feeding-the-dragon- play/](http://www.sharonwashington.com/feeding-the-dragon-play/)

</comment><comment><USER6> <OT> Is it just me, or does the comma after "last" seem very, very wrong?

<comment><USER7> Depends on what it's communicating. If there are other, non-secret apartments then the comma should probably be omitted, yeah. If these are _both_ the last apartments (without further qualification) _and_ secret, then the comma's good.

<comment><USER8> They're not though. No one has lived in these since 2006, but there are actually others, still in good shape.

[https://www.6sqft.com/life-behind-the-stacks-the-secret- apar...](https://www.6sqft.com/life-behind-the-stacks-the-secret-apartments- of-new-york-libraries/)

</comment></comment></comment><comment><USER9> Reading about this story reminds me of a great Murakami novel, Kafka on the Shore. There's something slightly eerie yet appealing about being able to wander around an empty library.

</comment><comment><USER10> What's interesting to me is that in the picture of the Library that opened in 1914 there are stains dripping down the facade from the windows and some other places. I would think that would take at least several years for something like that to appear. I wonder if the date is off on that photo.

<comment><USER2> Soot in rain on white. A couple of years later and it would likely be almost black. It's incredible what exposure will do to stonework, especially if the surface is a little bit rough.</comment></comment>


C++ Design Goals in the context of Rust - <AUTHOR> http://pcwalton.blogspot.com/2010/12/c-design-goals-in-context-of-rust.html

<comment><USER2> I'm really looking forward to Rust. D's community seems to be divided over certain issues (according to wikipedia) and I wonder if that division is hampering corporate adoption, meanwhile Go has Google's weight behind it, but its garbage collector has lost the interest of some coders that need to squeeze out as much performance as possible.

While the first thing the Rust team says is "Don't look at the syntax, we're still working on it", the first exposure a programmer has to a language is via the syntax, and I hope that it can be made attractive before Rust gets discounted by many as a good idea but poor execution.

As much as programmers love to declare that they use the best tool for the job, the countless religious wars over languages and editors shows that when they find something they like, they'll stick to it and it becomes entrenched and 20 years later we're still using C++ because there's too much built on it and it's too expensive to switch. In today's age of TL;DR let's hope that Rust can become attractive enough that people can appreciate what a modern systems language can bring to the table in safety and comfortability.</comment>


ChowNow, Instagram launch commission-free online food ordering - <AUTHOR> https://www.restaurantdive.com/news/chownow-instagram-launch-commission-free-online-food-ordering/576146/ <comment> Pick-A-Hill2019 "ChowNow charges a monthly fee of $99 to $149 a month per location" so yes, zero commission but not exactly 'free' either. Guess there really is no such thing as a free lunch after all</comment>


HPV Vaccines Are Reducing Infections, Warts – and Probably Cancer - <AUTHOR> https://www.nytimes.com/2019/06/27/health/hpv-vaccine-warts-cancer.html <comment><USER2> Mark</comment>


Jason Evangelho First 24 Hours with Fedora Workstation - <AUTHOR> https://www.forbes.com/sites/jasonevangelho/2019/03/07/my-first-24-hours-with-fedora-workstation/#35d1d3c65e69 <comment><USER2> "Fedora is primarily designed as a distro for developers and power users, and while I don't consider myself belonging to either category"

This gate-keeping by linux UX people is so silly. "for power users" usually mean "we will ignore documentation". While the opposite means "we will dumb everything down and remove features, but we will add a welcome message".</comment>


2D or not 2D (in the C++ Standard) – that is the question - <AUTHOR> https://hatcat.com/?p=48 <comment><USER2> The idea of adding a graphics API to a language standard is incredibly misguided. There are plenty of 2D graphics APIs already from SDL to one in QT, GTK, Cairo, Canvas, and then the more proprietary ones. People can not seem to stop creating them.

Perhaps people thought if a GFX API were incorporated into the C++ standard it would replace all the others, but... Can anyone imagine that actually happening? Really?

I'd be happy if languages would adopt Vec2 Vec3 and Vec4 as standard data types - both float and double. I understand there are ways to create these in most any language, I just want them standardized so we can all write code the same way and get the performance of some vector instructions without using intrinsics.

If they can't even standardize the obvious (fixed length) vector types used in graphics (and other things) they really shouldn't try to define a graphics API.

<comment><USER3> _I 'd be happy if languages would adopt Vec2 Vec3 and Vec4 as standard data types - both float and double. I understand there are ways to create these in most any language, I just want them standardized so we can all write code the same way and get the performance of some vector instructions without using intrinsics._

Yes. Over 15 years ago I proposed a library for Vec2, Vec3, and Vec4 to the C++ standards committee. It's the one from Graphics Gems, but rewritten as all inline.[1] The C++ standards people wanted more usage of templates.

A few academic projects use that code.

[1] [http://www.animats.com/source/index.html](http://www.animats.com/source/index.html)

<comment><USER4> What the C++ (and C) stadards could use is a native type for SIMD vectors. In other words, standardize the GCC vector extensions [0] or some variant thereof.

Just adding a new header-only library for vector arithmetic isn't something that needs to be in the language standard (library), there are lots of options for that already (such as glm[1]).

I've been using vector extensions for my 3d graphics and physics stuff for years now and it works great. There are some pain points, but it already covers most of what I need. As a bonus, it can be used in plain C and you get all the usual math operators (+, -, /, etc) for free. There are minor incompatibilities between GCC and Clang, but nothing a few #ifdefs won't solve.

Here's a quick introduction in a few lines of code:

        typedef float vec4f __attribute__((vector_size(16)));
        vec4f a = { 1, 2, 3, 4 }, b = { 5, 6, 7, 8 };
        vec4f c = a + b;
        vec4f d = (a + b) * c; // with --ffast-math, you will get fused multiply-and-add (MAD)

In my projects, I've always put together an ad-hoc collection of arithmetic routines I need (e.g. dot, cross, matrix product, inverse, etc). A proper, well tested library of basic math operations for SIMD vectors would be very useful but I haven't got the time it takes.

If anyone is interested, some of my math routines are bundled in this github repo [2]. It's incomplete, undocumented, not well tested and there are known issues I haven't gotten around to (e.g. quaternion products give wrong results).

If anyone thinks this is useful and is interested in contributing/collaborating, leave a comment.

[0] [https://gcc.gnu.org/onlinedocs/gcc/Vector- Extensions.html](https://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html)

[1] [https://glm.g-truc.net/0.9.9/index.html](https://glm.g-truc.net/0.9.9/index.html)

[2] [https://github.com/rikusalminen/threedee- simd](https://github.com/rikusalminen/threedee-simd)

<comment><USER2> This is exactly what I'm talking about. I want these vectors as standard types. First class data types, not part of a library or typedef. The example given in the parent comment is spot on with typical use.

I like that GCC defined their own way to declare these that is independent of x86, ARM, and Altivec intrinsics so your code is portable (so long as you use GCC). Geometrically relevant vectors are common enough to be native types, let's get there.

<comment><USER4> > so your code is portable (so long as you use GCC)

Or Clang!

There are only minute differences between vector extensions in GCC vs. Clang. Little things like __builtin_shuffle vs. __builtin_shufflevector.

</comment></comment></comment></comment></comment><comment><USER5> I appreciate the work a lot of people put into this proposal but I'm actually glad it isn't moving forward. I don't think there's an example of a graphics API which is really good across a wide range of use cases from beginners to demanding professional use and I'm not sure it's good for the language to standardize on something that say only solves the beginner use case. This is really an area best left to libraries outside the core language standard currently I think.

</comment><comment><USER6> The push for a standard 2d api in C++ seems so bizarre to me. There's a place for languages like python that are designed around quickly prototyping things, but this has never really been C++'s domain. Programmers for most of the esoteric, resource constrained platforms where C/C++ really shines don't have much need for a 2d api, or will probably want to write their own. Meanwhile, popular libraries already meet the needs of most of everyone else.

Is there a genuine use case for a language-level standard 2d api? To me it seems like it is being pushed as a standard just for the sake of a checkbox, but am I missing something here?

<comment><USER7> One strong argument at the evening session was that not everyone has access to non-standard libraries, which in my opinion is a ridiculous argument. If your work doesn't allow non-standard libraries, then it's time to move on, we really should not feed the companies with the "not invented here"-syndrome.

Another argument many people brought up is that it would allow C++ to be more usable as a teaching tool or a few shared their stories of basic graphic programming which eventually landed them in C++. But I really don't see why the standard needs a toy API. If people pick C++ as their learning language, they should be able to learn how to use another library, since that's very much part of learning C++. Besides there are more complicated concepts in C++ than having to follow some dead simple tutorial on getting another library working. And if you go down the teacher route, then it's really no issue setting up a library for those learning.

And finally there's the argument of "other languages have it too". Yet, I haven't really seen examples of that. I think .NET has something like that, but then again .NET also has a full API for window creation and tons of other things. Maybe a simple drawing API is a good idea, but first we'd have to add other things to the standard.

All in all and seeing the evolution of OpenGL, I simply don't see a reason why the C++ standard needs a simple drawing API right now. There are tons of other things that are way more important and should be added first. And once you get to a standard drawing API, what good is it, when you still have to write custom/platform specific code just to get an actual rendering surface (aka window) on screen?

And one final point is, who needs a API that is designed for a software renderer? What year is and who is still running software renderers?

<comment><USER8> The authors of the recent, P0267 C++ graphics paper (aka "io2d"; latest revisions getting posted to [https://github.com/mikebmcl/io2dts/tree/master/papers](https://github.com/mikebmcl/io2dts/tree/master/papers)), as far as I've seen (online, mostly), aren't interested in making a "toy" API. Many, if not all of them, want people to be able to do 'real' work with it. They've also seemed willing to accept constructive feedback on it, and are cognizant that there is a good amount more work to be done, if something useful is to be a result!

There is, I think, room to work on different C++ features in parallel. A graphics expert isn't necessarily going to want, or be qualified, to lead a charge on all future, non-graphics features.

In terms of 'other languages have it too', here's one platform/standard that has it: HTML5. It's Canvas API is pretty widely available, although in practice, perhaps only with sufficiently powerful runtime-processing power.

Regarding software renderers, I'd argue that these are still useful, in some use cases. I've worked on some projects whereby a constexpr/compile-time canvas-style implementation would have been useful, I imagine.

</comment></comment></comment><comment><USER9> Since converting a number to a string still requires a lot of boilerplate in C++, sorting a container still requires typing the name of the container twice, and checking if a map or set contain a key requires lots of code, I can only imagine drawing a pixel is going to become something like this:

std::graphics::graphicsstream s(screen);

s << *std::graphics::drawPixel(screen.begin(), screen.end(), screen.left() + x, screen.top() + y, std::graphics::color_channel::red.begin() + 128, std::graphics::color_channel::green.begin() + 128, std::graphics::color_channel::blue.begin() + 128, std::graphics::color_channel::alpha.begin() + 255, std::graphics::modelfactory.getFactory()->createModel(std::graphics::color_model::srgb), screen.end())->reverse_iterator()->second;

C++ committee, if you read this, please make it simple (if at all), and also simplify the things from the first sentence :)

<comment><USER5> Converting a number to a string: std::to_string() available since C++11. Sorting a container will be sort(container) with the Range V3 proposal which is getting close to standardization. C++20 introduces a contains() member for map and set.

<comment><USER9> Cool! Been using C++11 for so long now and never knew about std::to_string.

Heard about the ranges many times already, I think they got some delays. What's wrong with functions in the standard library that simply take a container and call .begin() and .end() inside of them though? No such complex thing as ranges needed for that.

Contains sounds nice, didn't know about that one yet either.

Thanks for the info :)

<comment><USER5> It's looking likely that ranges will make it into C++20 according to the author of the proposal Eric Niebler: "The entirety of the Ranges TS with the addition of lazy adaptor pipelines is now all but certain to be in C++20."

[https://mobile.twitter.com/ericniebler/status/10054132797816...](https://mobile.twitter.com/ericniebler/status/1005413279781609473)

</comment></comment></comment></comment><comment><USER10> I think people disregard or forget the new programmer. Some of them are coming to C++. The question starts with how do I draw to the screen. The answer, well you download <pick a library>, compile it, add it to the include/linker paths, and then it should work. But, one thing is, if it isn't in the standard it does not exist.

A simple set_pixel/get_pixel onto a surface(real or just a buffer) is pretty powerful. it allows expressing data in much better terms than cout/printf for many domains. I remember the joy or displaying my first sine wave.

I think the current proposal was too heavy and I think that a minimal subset where one can draw pixels, lines... onto a surface is all that is needed for now. This gives a standard way of expressing that idea that allows further abstractions in the future. But for now, I want an easy way to visualize something.

<comment><USER5> Better to focus on improving the situation with cross platform package managers and build systems for C++ IMO to simplify the process for beginners getting access to those third party libraries in their projects than trying to integrate graphics into the standard.

There is some progress being made on package managers for C++ but things are still pretty fragmented and not very beginner friendly.

<comment><USER11> Agreed. The beginner solution to get something renderable should be:

> cpm install cairo

And then in the source file:

import cairo;

(I think package manager, build system and modules need to go hand in hand)

<comment><USER10> vcpkg is almost there

</comment></comment></comment></comment><comment><USER12> If they're going to add some big new module to the standard, it should be networking, not 2D graphics.

 _Edit to add a little more rationale:_ networking is something quite a lot of programs need; it always needs OS support, but different OSes have different APIs that do basically the same thing. It's fairly easy to pick a common subset that covers 95% of use cases and there would be huge value in standardizing it. I would definitely use it.

2D graphics is something that not many programs need, and that can already be done in pure user code (apart from actually displaying it on the screen). It's hard to pick a useful common subset -- what kinds of curves do you support? How about dashes, outlines, shadows? What about color spaces? What about displaying to the screen, what about printing? It would be a huge mess. Even if it were standardized I'm not sure I would end up using it (especially if it were as awkward to use as much of the STL).

<comment><USER5> Networking is coming: the TS was published earlier this year and there are efforts to get it into C++20.

[http://www.open- std.org/jtc1/sc22/wg21/docs/papers/2018/n473...](http://www.open- std.org/jtc1/sc22/wg21/docs/papers/2018/n4734.pdf)

<comment><USER13> It has been pushed to C++23 thanks to executors.

</comment></comment></comment><comment><USER7> > Several thousand hours of work has gone into this proposal, and we need a > way of preventing this from happening again.

To be fair, there were quite a few voices against it, but they were mostly ignore if not belittled by telling them to write a paper or be quiet. [1]

If you only take people's opinion serious when they operate in a committee manner, then you shouldn't be surprised that despite your invested time, people eventually will rise up and stop the work.

Also just because some people invested a lot of hours doesn't simply satisfy the condition to force something in the standard that is still far away from finished. Sunk cost fallacy anyone?

[1] [https://www.reddit.com/r/cpp/comments/89q6wr/sg13_2d_graphic...](https://www.reddit.com/r/cpp/comments/89q6wr/sg13_2d_graphics_why_it_failed/)

</comment><comment><USER14> We need less crap in the C++ standard, not more.

<comment><USER15> I got to start a begin-with-an-empty-buffer project last year and chose c++17, treating it as a brand new language as if I'd never used C++ before. If you start with modern constructs and work backwards (i.e. ignoring legacy constructs and ideas that haven't aged well, like a "pure O-O" approach or iostreams) it's actually a pretty clear and expressive language.

Another advantage with the 'empty buffer" is we could compile right away with almost every warning enabled (except for some 3P libraries we use) which also permitted the compiler to make some very aggressive optimizations.

Unfortunately most people don't have this luxury :-(. But from this perspective I've generally been happy with the work the committee's been doing recently.

<comment><USER16> What resources did you use to learn the new features of C++. I don't know there language, but I began starting to learn it, and I don't know if what I'm learning is the nice new "modern constructs" or the crappy old ones.

<comment><USER15> I can't stand videos so if you can't use pjmlp's advice, do start with the tour of c++, then read the summaries of standards compliance for gcc and llvm (which are on their respective websites) which will suggest which features are new and worth reading up on.

I also read the standard (well, the "almost final" standard, which is actually the final one but which could be published on the net because it was what was voted on to _become_ the standard -- the standards themselves are copyrighted and can't be posted to the net!) but unless you're used to reading language standards it may confused more than it answers.

The blogs of folks like herb Sutter also explain a lot of subtle points and best practices.

</comment></comment></comment></comment><comment><USER17> people: we want to make cross platform UIs

working group: here are 2D graphics; you can write yourself a toolkit

</comment><comment><USER18> The reason to have a 2D graphics library as part of the C++ Standard is to allow one to write a C++ program that does graphics such that it has only one dependency: an implementation of the C++ Standard. It won't be for everyone and certainly won't affect the ability to use any other graphics library. This is a good thing, IMHO. Same for more complete access to the file system, something that has also been missing from C++.

</comment><comment><USER19> And so marks the end of the std::graphics era. I originally thought it was a good idea, but now agree that a graphics API like that has no place in standardisation.

</comment><comment> c-smile TL;DR: that's tough, sigh.

For the Sciter project ( [https://sciter.com](https://sciter.com) ) I did exactly that: created abstract graphics C++ library that wraps all supported backends:

1\. Direct2D and GDI+ on Windows; 2\. Skia on Windows, MacOS and Linux; 3\. Cairo on Linux/GTK; 4\. CoreGraphics on MacOS;

So I hope I know the subject, and here are few comments:

Biggest problem.

Two significantly different drawing models:

GPU based libraries (Direct2D/DirectX, Skia/OpenGL): these use batch rendering - calls like graphics::fill_rect(...) just produce record in command stream that gets sent to GPU for rendering. Kind of asynchronous rendering.

CPU libraries - rasterization of graphic primitives to a bitmap / framebuffer. These are Cairo, GDI+ and CoreGraphics.

While GPU and CPU ways of rendering can be wrapped into single, unified interface but there are nuances.

GPU libraries update target surface in full. Even when you need to change one pixel - you send full batch to GPU to render whole thing all together. (there are optimizations in that but in 99% that is that way)

CPU libraries update just that pixel on bitmap. But when you need to update whole window on high-DPI monitors ... Number of pixels on 300ppi screen is 9 times larger than on 96ppi screen. Our current CPUs and buses are still from "96ppi era". GPU is the only option with high-DPI.

Pixel composition operations ([https://developer.mozilla.org/en- US/docs/Web/API/Canvas_API/...](https://developer.mozilla.org/en- US/docs/Web/API/Canvas_API/Tutorial/Compositing)) are achievable on CPU but there is no target bitmap on GPU in common sense - not clear what these mean there, etc.

Conceptually C++ 2D library can be built around single GFX backend function similar to NV_path_renderer ( [https://www.khronos.org/registry/OpenGL/extensions/NV/NV_pat...](https://www.khronos.org/registry/OpenGL/extensions/NV/NV_path_rendering.txt) ). All 2D primitives can be simple wrappers of NV_path_renderer calls + blend_bitmap().

But there is another huge problem - text rendering. Just few keywords: LTR, RTL, TTB text layouts. Fonts discovery and substitution. Different font formats. ClearType and other antialiasing technics tied with monitor architectures. That's too big and I am not sure about the size of 2D specification that will include all needed details.

<comment><USER20> I've been playing in the space too, and basically agree with what you say but have some other observations.

1\. The "fancy" operations like the blending modes (I believe these were originally from Photoshop and are now part of PDF, among other things) are definitely doable on GPU, but many of them require shaders and cannot be done in the fixed-function blend pipeline.

2\. There are a bunch of optimizations that are still very useful on GPU, including reordering to improve batching of draw calls, and techniques to reduce overdraw when an operation will be completely painted over. Webrender uses hierarchical z-buffer to GPU-accelerate these.

3\. There are advanced things like linear-sRGB colorspaces that are very useful, well supported on modern GPU hardware.

4\. CoreGraphics on MacOS is pretty slow. On Windows, I've had varying results with Direct2D (I know we chatted some in a previous thread). I think it depends a lot on the quality of drivers.

4\. Incremental repaint (as opposed to painting the surface in full) is still useful, if for no other reason than to reduce energy use. It's difficult on some platforms (Mac), well supported on others (Windows), and optional/driver dependent on others (Linux/Android).

5\. Clipping is still where much of the performance dies. Sure, you _can_ specify everything in terms of bitmap blending, but do you want to? That's an awful lot of gmem bandwidth you're churning.

And yes, text is fantastically complicated.

Long story short, I don't see any good one-size-fits-all solution here.

</comment></comment><comment><USER21> Sadly Stroustrup said no recently.

</comment><comment><USER22> So I read the 2D graphics prop, P0267[1] and this summary[2], and it seems to suffer from most of the problems that caused, e.g., HTML5 Canvas to be superseded by WebGL whenever it became practical to do so in most browsers. (And Canvas had the solid advantage of having no competitors. C++ has Qt and Cairo and boost and about five hundred game engines.)

2D matrices with no 3D do not meet the requirements for most complex applications. (At least there are inversions though). Even in 2D applications, usually the world ends up being, de facto, a 3D one (they are "2D with layers", so that the world does have z coordinates). Those applications may only need 2D rendering, but they do use (limited) 3D linear algebra.

I also think there probably should be oriented bounding boxes, even for 2D. "Simple" APIs that only provide axis aligned bounding boxes, which yes, is almost all of them, cause beginner programmers tons of headaches as they have to figure out linear algebra to do such things as "tell me if the closest box around this rotated object intersects the closest box around this other rotated object".

The emphasis on vector graphics seem strange. Even in platforms like Android, we haven't seen vector graphics come to the forefront, instead, the approach used for UI graphics scaling is providing raster graphics at different resolutions. Vector graphics are not, in fact, more efficient for the majority of applications, and providing essentially zero read/write capability for common vector formats doesn't help.

It seems to be intended to be a teaching API. Undergrad courses don't use C++ as much as they did when, well, I was in undergrad, but those that do teach graphics with OpenGL (not even Cairo or Qt). Why? Well, 2D-only non-hardware accelerated graphics are not, in fact, hugely useful or relevant to the vast majority of C++ programmers. Though I am primarily a C++ programmer, I write UIs in C# or Java (yes, I know). The proposed spec, anyway, does not even have a "create window" API, making it pretty bad as a basis for a UI toolkit (presumably you still have to obtain the window handle through platform- dependent means). The reason I don't write charts in C++ is not actually the lack of 2d APIs, Qt is accessible enough, it's the lack of good, easy data input facilities compared to languages like Python (or well, JavaScript...). When reading XML or CSV requires a library no one is going to use your language for charting.

And as a last point that I admit is more of an aesthetic issue, what is up with preceding all data types with "basic_"? They're basic in Qt and HTML5 Canvas but none of those actually call it a "basic_circle" anyway. This is going to turn autocomplete into a terrible pain as well as add five characters to every line for pretty much no reason. Just call it circle, we won't mind.

[1][http://www.open- std.org/jtc1/sc22/wg21/docs/papers/2018/p026...](http://www.open- std.org/jtc1/sc22/wg21/docs/papers/2018/p0267r7.pdf) [2][http://open- std.org/JTC1/SC22/WG21/docs/papers/2017/p0669r0....](http://open- std.org/JTC1/SC22/WG21/docs/papers/2017/p0669r0.pdf)

</comment><comment><USER23> With all these new languages the intimidated, middle aged c++ language is having a mid-life crisis and is getting tattoos. Knock it off, act your age and enjoy the ride into the sunset with your dad, c.</comment>


Tl;drplz - shorten the web - <AUTHOR> http://tldrplz.com/

<comment><USER2> Has anyone found a page that has a TL;DR?</comment>


New 'machine unlearning' technique deletes unwanted data - <AUTHOR> http://www.kurzweilai.net/new-machine-unlearning-technique-deletes-unwanted-data?utm_source=KurzweilAI+Daily+Newsletter&utm_campaign=e4e04d784f-UA-946742-1&utm_medium=email&utm_term=0_6de721fb33-e4e04d784f-282136021 <comment><USER2> What appears to be the paper: [http://yinzhicao.org/unlearning/UnlearningOakland15.pdf](http://yinzhicao.org/unlearning/UnlearningOakland15.pdf)</comment>


The Microsoft number we all want to know: Windows 8 sales to date - <AUTHOR> http://www.zdnet.com/the-microsoft-number-we-all-want-to-know-windows-8-sales-to-date-7000014238/

<comment><USER2> The other Microsoft number we all want to know: How much time has Steve Ballmer spent actually using Windows 8 desktop.</comment>


The Thing About Burnout - <AUTHOR> https://docs.google.com/presentation/d/1oGNNZn4eX-a0jj9W04NjeP-2RzLkCmlxyKC8UXmfauo/edit#slide=id.g654c726fad_2_142 <comment><USER2> Really solid talk. This really hit me.

I don't know about anyone else, but a sign that I'm burned out is when I start having trouble composing sentences/finding words for things</comment>


Ask HN: How's the tech scene in San Diego? - <AUTHOR> <comment><USER2> It's mostly dominated by biotech and defense jobs out here. You can find plenty of startup jobs but obviously the number of openings is nowhere near SF, where I came from.

Carlsbad up north is another hotspot with lots of tech startups.

</comment><comment><USER3> not very good, don't move here if you're looking for tech jobs

</comment><comment><USER4> lots of biotech</comment>


Ask HN: Whats your home office setup? - <AUTHOR>

Just moved into a new apartment and am wanting some inspiration.... so whats your home office setup like?  Do you have any pics? <comment><USER2> Workstation: 13" Macbook Air, Thunderbolt Display, Wired Apple Keyboard and Apple Mouse, Microsoft LifeChat LX 6000 Headset for Hangouts/Skype [[http://www.microsoft.com/hardware/en-us/b/lifechat- lx-6000-f...](http://www.microsoft.com/hardware/en-us/b/lifechat-lx-6000-for- business/7XF-00001)].

Desk: Gerton/Finnvard

[http://www.ikea.com/us/en/catalog/products/50106773/](http://www.ikea.com/us/en/catalog/products/50106773/) [http://www.ikea.com/us/en/catalog/products/00225293/](http://www.ikea.com/us/en/catalog/products/00225293/)

</comment><comment><USER3> When it gets warm enough each spring, I set up a folding table in a sunroom on the back of my house, and move my laptop along with a second monitor over there. The room has 5-foot-tall windows all the way around which I keep open. My screens are shaded from the sun, but otherwise it feels just the same as being outdoors all day. That's my home office until the fall, when I go back to using one of my spare bedrooms.

[http://www.dangrossman.info/wp- content/uploads/IMG_20130714_...](http://www.dangrossman.info/wp- content/uploads/IMG_20130714_211421-500x500.jpg)

<comment><USER4> Awesome setup, what's the desk - I need a new one, mines really flimsy :(

<comment><USER3> [http://www.walmart.com/ip/Mainstays-6-Centerfold-Table- Multi...](http://www.walmart.com/ip/Mainstays-6-Centerfold-Table-Multiple- Colors/33148258)

<comment><USER4> Cheers <3

</comment></comment></comment></comment><comment><USER5> My portable office: Noise canceling headphones(Linx Audio), Microsoft Arc Keyboard, Microsoft Arc Mouse, 22" AOC usb monitor ([http://us.aoc.com/monitor_displays/e2251fwu](http://us.aoc.com/monitor_displays/e2251fwu)) and my laptop, of course.

Rooted Android phone with Foxfi for tethering in case internet is unreliable.

Commuting is for wussies!

</comment><comment><USER6> Reddit has a lot of pictures of various setups, though maybe not specifically for "home office" purposes...

[http://www.reddit.com/r/battlestations](http://www.reddit.com/r/battlestations)</comment>


Ask Hacker News: What is the most undervalued web technology? (2me RSS) - <AUTHOR> What about you? <comment><USER2> Unless I misunderstand the question, I'd say Scalable Vector Graphics. A pretty decent format that's very badly supported in out-of-the-box browsers even though it's been in existance for several years. Consistent SVG support would allow a lot of server work to be shifted to the client.

</comment><comment><USER3> Tables. How tedious is it to code beautiful looking layouts nowadays, with CSS and all? Sometimes, I dream of those messy, ugly, large, but easy-to-make- with-photoshop tables.

ahhhhhhhhhhh.

</comment><comment><USER4> If it's just undervalued tech, and not "what's the most powerful tech that's obscure" I'd say it's the PNG file format. Lossless, greater color-depth, and alpha-blending: PNG would make the most difference on the most number of average people's web pages if they used it. Some of this other stuff is a lot more powerful, but it doesn't get my vote for undervalued because I think the audience is anybody who is creating a web page, not just tech guys.

<comment><USER5> I'd say there are really only two reasons that have stopped widespread adoption of PNG:

1\. The file sizes can be rather large (less of a problem these days)

2\. IE6 improperly displays PNG alpha (This is big one).

Even the "IE7" javascript hack (<http://dean.edwards.name/IE7/>) didn't really catch on.

</comment></comment><comment><USER6> I can think of RSS, Atom, RDF. But to me Javascript is the most undervalued. Plain old Javascript - the first mainstream lambda programming language.

</comment><comment><USER7> JavaScript, at least up until recently.

It definitely got a bad reputation due to it's inappropriate name (trying to jump on the Java bandwagon, nothing to with Java whatsoever), copy/paste JavaScript snippets of the late 90s (giving us exciting features like blinking/scrolling text, fun cursors, etc), ginormous browser inconsistencies, and the use of prototypal inheritance instead of classical inheritance.

</comment><comment><USER8> HTTP.

It's much more than just a means to push bits from server to client. It can be a very subtle way to get entire networks of computers to cooperate in wonderfully scalable and flexible ways.

</comment><comment><USER9> email for me.

</comment><comment><USER10> XSL-FO.

</comment><comment><USER11> SIP

</comment><comment><USER12> Python browser applets!

</comment><comment><USER13> Facebook

<comment><USER14> I can't tell if that's sarcasm.

<comment><USER13> Would I have gotten modded up if I had said yes?</comment></comment></comment>


Fanny Cradock, a lodestar in the foul-tasting odyssey of bad British food - <AUTHOR> https://www.theparisreview.org/blog/2020/09/16/the-off-kilter-history-of-british-cuisine/ <comment><USER2> As most people know, British food has improved a million times since the days of Fanny Craddock on black & white TV. British people know about food now, watch endless foodie shows, they can cook, and the UK supermarkets have great ingredients. The influx of people from what was the empire helped open everybody's horizons. You get the weird situation where the Indian food in Britain is the best in the world, for example.

<comment><USER3> > the Indian food in Britain is the best in the world

Got about a billion people here who'd like to disagree. In fact, of all the crimes against humanity the British visited on India, I think that assertion might just be the worst.

<comment><USER4> You're being heavily downvoted but I can't imagine by who or why. Certainly not by people who've eaten Indian food in both India and the UK.

While there are a few good restaurants, most Indian restaurants in the UK are bland beyond reason, catering to the common palate. There's nothing wrong with liking bland food or restaurants catering to that preference, but let's not make this extraordinary claim that it's better than the food in India. For most part the food is plain and plays it safe. For example, it's rare to find Indo-Chinese, a cuisine nothing like Chinese or Indian but a staple of cuisine in India.

<comment><USER5> It's funny to read a thread of people arguing over how good certain food is, as if that was some kind of objective matter amenable to resolution.

<comment><USER4> This isn't an argument over say Italian vs French cuisine. That's undecideable.

This is an extraordinary claim that by taking Indian food to the UK, stripping it of it's spice to suit the locals somehow made it better. It'd be like claiming Italian cuisine became better without the tomatoes or Mexican cuisine better without the beans.

</comment></comment></comment></comment></comment><comment><USER6> I'm the last person to wave the flag for Britain but I've never understood this meme about our food being bad, when so much of it is inarguably world class. For starters, so to speak, the Full English is obviously the king of breakfasts, a traditional Sunday roast cannot be beaten, we have the best cheese in the world by some considerable distance, and as for puddings, pies, crumbles, custard... well need I say any more?

<comment><USER7> I was always surprised as a child that mint sauce was singled out in "Asterix in Britain" (or at least the English translation!) as the very worst of English food - as I think it has a delightful subtle taste!

<comment><USER8> Mint sauce bought in the supermarket is too sweet, and often has artificial thickener.

From age 6 or so, it was my contribution to Sunday dinner. Much better!

Like this: [https://www.bbc.co.uk/food/recipes/realmintsauce_67706](https://www.bbc.co.uk/food/recipes/realmintsauce_67706)

</comment></comment></comment><comment><USER3> As Gyles Brandreth said, she was an interesting cross between Mary Berry and Jeremy Clarkson [1].

[1] [https://youtu.be/PKva9CAPygQ](https://youtu.be/PKva9CAPygQ)

</comment><comment><USER9> [https://youtu.be/kunuXThp51E](https://youtu.be/kunuXThp51E) 1975 Fanny cooks Turkey. Cradock was a lodestar of how weird the British class system and the BBC were in the 70's, along with BBC A list characters like Jimmy Savile. They had little to do with real life and were extremely weird.

British cuisine these days is amazing, all the old cliches no longer apply IMO

<comment><USER10> Home _and_ garden! In case anyone else needs a chaser: [https://www.youtube.com/watch?v=h1K4v5gPz_s](https://www.youtube.com/watch?v=h1K4v5gPz_s)

Any specific recommendations for contemporary british cuisine?

<comment><USER11> Tommy Banks, "Roots" in York. Very refined British cuisine, using local produce.

Thinking back a few years, "The fat duck" was voted as one of the best restaurants in the world.

Check out the great British menu on the BBC too. Chefs from around Britain on top of their game, usually making refined versions of British classics

</comment></comment></comment><comment><USER12> olde joke:

Heaven:

The police are British

The cooks are French

The engineers are German

The administrators are Swiss

The lovers are Italian

Hell:

The police are German

 _The cooks are British_

The engineers are Italian

The administrators are French

The lovers are Swiss

<comment><USER10> The trope is not only olde, but positively archaic. Plutarch says Stratonicus mockingly proposed a law that:

The conductors of mysteries and processions be Athenian

The organisers of games be Eleians

The whipping-boys, should any hellene misbehave, be Spartan

</comment></comment><comment><USER13> >>> English never had a cuisine

Fish & Chips was derived from Portuguese chefs in Goa India

<comment><USER14> Is any cuisine, or any aspect of culture for that matter, ever not derivative? I doubt it.

The Portuguese may have been early European consumers of potatoes, but they likely got that from the Spanish, who in turn got it from Central or South America, where human consumption of this tuber originated thousands of years ago. There is no telling how many cultures it may have passed through that have been lost to the ages. And even the first potato consumers may have been inspired to eat potatoes from a prior culture of eating other sorts of roots.

</comment></comment><comment><USER15> In jest I like to describe British native food as follows:

When people are starving, they're willing to eat things they otherwise would throw away. Unfortunately the British decided the PREFERRED those things, and attempt to make every dish taste accordingly.

<comment><USER16> Not every function has to be a programmatic masterpiece

Not every meal has to be a culinary experience

Meat, potatoes and two veg might be mocked as unadventurous and bland but it's a decent balance and gets the job done.

<comment><USER8> > Meat, potatoes and two veg might be mocked as unadventurous and bland but > it's a decent balance and gets the job done.

I think you have neatly summarized the usual criticisms of British food.

Much of it is easily improved, but many British people (including my parents) don't bother with even the smallest improvements to the most basic recipe. Just garnishing with some fresh herbs would be a good start, or adding some herbs or spices during cooking. Then we can talk about sauces.

<comment><USER15> Or bothering to pay attention to cooking methods. Sunday roast is awesome by itself, if you cook it right. No extra seasoning needed.</comment></comment></comment></comment>


Arcade Raid – The Duke of Lancaster Ship - <AUTHOR> https://arcadeblogger.com/2016/05/06/arcade-raid-the-duke-of-lancaster-ship/ <comment><USER2> It's interesting to note that, while in this case it was classic arcade game collectors, were the right connections to be made there might be a dozen other enthusiast groups around who'd have given their right arms to come relieve the ship of its, say, chandeliers or its plumbing fixtures or its antique shipping charts or what have you.

It's always surprising how many niche pursuits there are, with people around the world pouring passion and time into them and going largely unnoticed.

</comment><comment><USER3> I know commenting on the website and not the content is deeply frowned upon, but this case is so egregious that I feel compelled to break the rule.

The entire left side of my screen is a static image. I can't scroll to pass it. Literally half a screen just not doing anything during my entire reading experience. I'm the last person to complain about web-design (really I'm a total philistine on these issues). But its bad enough that it got in the way of digesting the article efficiently. That's where I draw the line.

<comment><USER2> It's just a responsive design to keep the body text from getting too wide. Most sites do this one way or another, because very wide columns of text are harder to read.

I mean, if you read the same article on medium.com then much of your screen still wouldn't be doing anything - on medium the unused space would be blank margins; here it's a hero image.

<comment><USER4> Preventing the text getting too wide is one thing, but this seems excessive. The image to the side is distracting, and the actual text of the article is only taking about 35% of the screen width.

<comment><USER2> > the article is only taking about 35% of the screen width

The point is absolute size, not relative. I'm no expert but I seem to recall usability types talking about ideal columns of text being 60-90 characters or so. If your browser is three times wider than that, it's reasonable for sites to show text that takes only a third of the screen. Why wouldn't they?

</comment></comment></comment></comment><comment><USER5> Wow, you can see this ship from the train while travelling between the North Wales coast and London. I must have passed it hundreds of times while travelling this way since I was a young boy, and was always intrigued. I would have been even more interested if I'd known the contents!

</comment><comment><USER6> The graffiti on the outside of that ship is amazing as well.

<comment><USER7> That's the work of Latvian street artist kiwie. Here's a great making of video [https://vimeo.com/48299610](https://vimeo.com/48299610)

<comment><USER6> Awesome thanks for sharing this!

</comment></comment></comment><comment><USER8> Wow. That's not a place to expect to find arcade games from 30 years ago.

</comment><comment><USER9> That design is rough. Why is the left half of the page completely devoted to a static photo of the ship?

<comment><USER10> It's just a standard Wordpress theme. Images are resized dependent on the device you are viewing on. Viewed on mobile or tablet, the hero image is at the top and scrolls through as you read.</comment></comment>