Hacker Newsnew | past | comments | ask | show | jobs | submit | jklowden's commentslogin

If only there was one good library. libxml2 is the leading one, and it has been beleaguered by problems internal and external. It has had ABI instability and been besieged by CVE reports.

I agree it shouldn’t be hard. On the evidence, though, it is. I suspect the root problem is lack of tools. Lex and yacc tools for Unicode are relatively scarce. At least that’s what’s set me back from rolling my own.


What is wrong with xml-rs ?

iRobot’s largest creditor isn’t its Chinese supplier. It’s the US government, in the form of unpaid tariffs, some $3.5 million. Arguably it was Trump’s stupid tariffs that drove the company out of business. Rather than bringing manufacturing to the US, it allowed the Chinese to acquire an American company, leaving production right where it is.


I believe that’s what we call a "view".


There is no pass-by-value overhead. There are only implementation decisions.

Pass by value describes the semantics of a function call, not implementation. Passing a const reference in C++ is pass-by-value. If the user opts to pass "a copy" instead, nothing requires the compiler to actually copy the data. The compiler is required only to supply the actual parameter as if it was copied.


This might be true in the abstract but it's not true of actual compilers dealing with real world calling conventions. Absent inlining or whole program optimization, calling conventions across translation units don't leave much room for flexibility.

The semantics of pass by const reference are also not exactly the same as pass by value in C++. The compiler can't in general assume a const reference doesn't alias other arguments or global variables and so has to be more conservative with certain optimizations than with pass by value.


Unfortunately "the compiler is required to supply the actual parameter as if it was copied" is leaky with respect to the ABI and linker. In C and C++ you cannot fully abstract it.


> Passing a const reference in C++ is pass-by-value.

I can cast the const away. The implementation does not hide this detail. The semantics therefore must be understood by the programmer.


You are thinking "call by value". The author probably used "pass" not "call" specifically to avoid this.


There is no difference. Call-by-alue is the older term, and I believe still preferred in CS acdemia.


I think that call-by-value/call-by-name/call-by-need[1] are more about strict vs lazy evaluation, as opposed to by-value/by-reference semantics.

[1] there is also call-by-push-value, but i was never able to wrap my mind around it.


Note well: the claims about TCP come with some evidence, in the form of a graph. The claims for QUIC do not.

Many of the claims are dubious. TCP has "no notion of multiple steams"? What are two sockets, then? What is poll(2)? The onus is on QUIC to explain why it’s better for the application to multiplex the socket than for the kernel to multiplex the device. AFAICT that question is assumed away in a deluge of words.

If the author thinks it’s the "end of TCP sockets", show us the research, the published papers and meticulous detail. Then tell me again why I should eschew the services of TCP and absorb its complexity into my application.


Manipulative tone of the article title says it all. "The end of".


Really glad NextDNS blocked my click.


Even the TCP graph is dubious. Cubic being systematically above the link capacity makes me chuckle. Yes bufferbloat can have cubic "hug" a somewhat higher limit, but it still needs to start under the link capacity.


That's easily explained, in the parts of the x axis missing in the plot it actually goes negative and pays back the borrowed bytes.


The obvious comparisons are between udp and tcp, and then between quic and ssh, given the notion of "multiple streams"


There was never any danger of public education, so eliminating that danger was quite easy. What we are undermining, though, is the benefit of public education. Witness the last election, where tens of millions were indifferent to democratic governance if it meant cheap gasoline and eggs.

And, yes, the assault on democracy is real. On January 20, Trump signed an order in support of free speech. Within a week he barred the AP over the Gulf of America. Within a month he illegally disbanded USAID. Within 3 months he began suing law firms and defunding university research. Today colleges are receiving letters demanding curriculum in exchange for funding. And we have four years more, at least, to endure.


>There was never any danger of public education,

For those who have changed the world to what it is today, and want that but more, I'm sure public schools have always been something to celebrate. I am not one of those people, however.

>though, is the benefit of public education.

That benefit, even when I treat it with the most generous interpretation, is gone and has been for awhile. People whose children attend public school do not benefit from this, their children are being shut out of the economy in favor of bringing in workers from other countries. The political apparatus benefits, if those children are indoctrinated to vote correctly even as they grow up to only be fit to get a 20-hour part time job at Starbucks. Even now, you're worried about the politics in this very comment, you don't really care that those children won't grow up to earn a viable livelihood.

>Within a month he illegally disbanded USAID.

Oh noes! I too wish that the United States would spend millions and billions on foreigners in foreign countries. Won't anyone think of the CIA soft power we're losing?


90% of funding for K-12 public schools comes from state and local taxes. That’s hardly a one-size-fits-all national system.

Would you tell me though, please, what language and cultural differences should inflect science or math or literature or history? Are you suggesting evolution not be taught where there are parents who object, or that the civil war be taught differently in the former confederacy, so as not to hurt anyone’s feelings? Those things are happening, of course. I’m just innocent of any defense for them.


I can't tell if you're playing devils advocate, but in Texas, many students speak Spanish as their first language, we also have students and other parts of the country whose first language is not English. Some of those make up the majority, if not overwhelming majority, of some of these schools. I think it's naïve to assume that they can be taught the same as the rest of the country. There's also students with attention deficit, hyperactivity disorder, autism, disabilities, and all of that is best handled the local level so they can serve the local students. I get why some people prefer federalism and education, it allows for greater federal control. But clearly it's a disservice to students, or else the testing would show it.


To be fair, the characterization is entirely accurate. Anyone who speaks of "government schools" advocates their demise. They want an entirely privatized system funded at taxpayer expense: a voucher for every child to be spent as each parent decides. If that means every public school closes, well, voila: the magic of the market.

Whoever "they" are in your assertion, they are not cutting down bureaucracy or promoting local control. The federal government has not issued new regulations to cap administrative overhead, for example. It simply abandoned its civil rights enforcement and slashed funding.

Agreed, public schools in America do a poor job. Something like 1/3 of graduating seniors are ready for college work, according to the "national report card". But that’s by design: elected school boards and administration determine salaries and standards. No principal wants to explain poor grades to a disappointed parent; no teacher wants to combat a parent’s prejudice by teaching real history or biology. So, the curriculum is mediocre and grades are high.

The situation isn’t much better at private schools by the way. Grade inflation is everywhere. Harvard just has the luxury of picking its students.

No Child Left Behind and civil-rights enforcement by the department of education did narrow the achievement gap, which has now begun to widen again. So it is clear the department directly benefits student. The complaint is not that; it is that it benefits the "wrong" students, if you get my drift.


Brian Kernighan cannot be topped. He is easy to read, succinct, clear, and sometimes funny.


I second this. Donovan and Kernighan's The Go Programming Language taught me enough about the language to get my first job in it in less than a month.

Four and half years later, I'm still employed as a professional Go programmer.

Thanks, Brian!


Absolutely on board with you and GP, I forgot Kernighan, I've only looked at a couple of chapters of the C Programming Language, but it was totally wonderful to read yes! He's definitely up there


Why do I remember that every C64 BASIC keyword was a 2-byte integer? A typing shortcut was to enter the first letter, followed by a "shifted" high-bit character. Every keyword was represented that way.

Variables were also 2-bytes, but ASCII. The user could enter a longer name, but only the first two characters were significant.


Yes, variable names are 2 bytes, in their stored memory location in RAM. As these must be 7-bit ASCII bytes, the sign-bits and their distribution over these two bytes is used to encode the type. And all simple variables take 7 bytes of memory in total, regardless, whether the remaining 5 bytes are actually needed to store the data or not.

  sign-bits   type (payload)

  0   0   ... floating point number (1 byte exponent, 4 bytes mantissa)
  1   1   ... integer (2 bytes)
  0   1   ... string (1 byte length, 2-bytes pointer to location)
  1   0   ... FN function (2 bytes pointer to BASIC, 2 bytes pointer to parameter variable)
In a program (the BASIC text), though, variables names are stored in full and in plain ASCII, at whatever length of characters.


Not every keyword could be abbreviated with only two characters. The linked article actually discusses this mechanism. Once tokenized, the keywords only took up a single byte.


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

Search: