HN user

opinali

378 karma

Software Engineer at Google https://plus.google.com/+OsvaldoDoederlein

Posts1
Comments160
View on HN

ChatGPT is a pure conversational model, while Google can integrate this into a vast knowledge model to work with actual facts. (Just speculation; Googler, but no inside info on this.) Of course, as Microsoft adds ChatGPT into Bing they should also integrate it into the rest of their search stack. This will be an interesting horse-race to watch since it won't be just the AI models but also a massive amount of secondary infrastructure for desired outcomes with content safety (no erotica or nazi pamphlets on demand), IP protection (no plagiarism), political and cultural sensibilities, disinfo, and a ton of other problems.

I was a late Spectrum dev, as a Brazilian geek several years behind the international market due to draconian restrictions on computer imports at the time (also, dad not rich enough to get me an Amiga...). Got one of my programs survive for posterity: https://worldofspectrum.org/archive/software/utilities/stk-y... (unfortunately only loading screenshots here; check YS #75).

That was a powerful hacking/debugging/programming utility. I am still proud of the HILOAD command which was capable of loading files from tape in any condition: if any error was found, this command would fill a separate buffer with the relative address of every error. Then you could use other commands to inspect the data and painstakingly recover it by guessing the correct value for damaged bits or bytes (they utility could dump memory in many ways, including some popular encodings of sprites for games). There was also a whole-block SHIFT command useful for this task because a loading error could make all following bytes to be shifted left or right some bits, because the tape data format didn't have a byte-boundary delimiter, it was just a stream of bits.

Thanks! Replying a bit here since that post is from 2015. One can write anecdotal examples that are biased both ways. But let's talk about a single issue, the IX/IY registers.

The IX/IY registers are heavyweight but one needs to remember the "best-practices" of that era and architecture. In well optimized Z80 code, the IX/IY registers are often used for critical "global variables" that you can keep all the time in registers across many subroutine calls (think "segment registers": base pointers for important tables or buffers that are not fixed addresses through the whole program). Their performance beats needing frequent indirect load/store from pointers stored in memory via other registers that often need to be preserved/restored.

You can also use some relatively low-latency instructions that involve IX/IY, in particular PUSH/POP were often used in optimized buffer-copy routines: you burn all registers to fetch up to 20 bytes of contiguous data with POPs, then you patch the SP register and issue PUSHs in inverse order to store those 20 bytes in another location; loop if needed for >20 bytes, even with loop overhead this is faster than LDIR/LDDR. Games used that trick all the time for block copies like sprite bitblt or double-buffer animation.

I'll be more convinced by realistic benchmarks, and yes the Fib2 that I quoted before is not impressive even for the standards of CPU microbenchmarks, but maybe someone would know some real-world code that had good ports to both CPUs and could give a better verdict. Unfortunately games are never good choices, the 8-bit systems had radically different architectures for essential features like video and audio so "ports" were often full rewrites even at a high level like rendering strategies... there might be exceptions, like the AI component of a chess game.

I'm not sure about this simple comparison of 6502 vs. Z80. Sure the Z80 instructions had higher latencies in clocks, but it also had more registers so you could write the same code with fewer memory load/stores and it had a 16-bit ALU. It also had a fair offering of complex instructions that, while very high-latency, should be faster than the equivalent sequence of simpler instructions and also helped with code density which was critical in systems with a max of 64KB (see https://web.eece.maine.edu/~vweaver/papers/iccd09/iccd09_den...).

For one data point in performance, theultimatebenchmark.org has some Forth benchmarks that apparently show a 4GHz Z80 beating the 6502 by 2X (best scores for each: mc-CP/M Z80 4Mhz / FIG-Forth 1.1 / Fib2 = 1m19s, Apple II 1Mhz / Apple GraForth / Fib2 = 2m19s).

Disclaimer: biased, veteran Z80 / ZX Spectrum programmer ;)

MSX was a hit in Brazil largely because of our closed market at the time, where importing computers was always very expensive and often illegal. A computer had to be a "national" product, even if that meant just a clone of foreign machines built with mostly imported parts (and very often violating copyright, e.g. I had a ZX Spectrum clone which manufacturer was sued by Sinclair, unsuccessfully, despite copying even the ROM code). In that environment the MSX was a great solution, local companies could join the party of selling a computer/peripherals/SW that benefited from a (hoped) worldwide market, without the costs of licensing or the hurdles of straight piracy.

The mental part is easy, if you can do that: close your eyes and focus on the background white noise that exists inside your head, until it becomes a clearly audible buzz that oscillates in sync with your pulse.

Virtually all big science/tech projects from early 20th century were state sponsored, so it was difficult for SF writers to imagine a future where important innovation might come from the private sector or emerge from large scale decentralized contributions. Frankly, this is still large true today if you consider that lots of modern stuff comes from tech companies that are becoming as rich and powerful as small nation states, so they can spare a few billions in basic research with long-term or uncertain ROI.

And to be fair with Asimov, he saw some of that for example with "U.S.Robotics", a fictitious private company that invented the positronic brain and had a monopoly on that business. Also, his Encyclopedia Galactica is the creation of a large group of "encyclopedists" who are basically academic elites, something we could see as a Wikipedia-like except that it wasn't produced by millions of joe schmoes but rather by a kind of priesthood of professional intellectuals. (Foundation makes these people work in a centralized organization, but that happens in a late period of the galactic empire, it's my impression that the origins of the Encyclopedia are way more descentralized.)

We also accidentally dropped two nukes in Japan, and accidentally made Napalm and Agent Orange rain into the Vietnamese, with enormously high and vastly-civilian casualties in both cases. And these are just easy cases where direct responsibility can be tracked all way up to the commander-in-chief, so please no BS about no official strategy.

And then of course, the military chain of command is exceedingly good at diluting responsibility -- generals will demand results implying but not writing down how far commanders can go; soldiers and commanders will cross many lines which no colleagues will report() and no immediate superiors will punish; the press will be strictly managed to not see anything that "national security" doesn't need us to see so our own civilian population will be morally appeased that we're being righteous, everyone is happy.

() A few will do, and then they're jailed for life as traitors.

I wish we'd crack down on this kind of abuse, but it's an arms race, and at some point hard to distinguish objectively. There's no solution without some parental responsibility... many parents are just too lazy, the hand a device to their kids and hope for the best. Parenting takes some effort; my children's devices have parental control apps (I use and recommend ScreenTime), as for purchases of any kind they have to ask me to put my password every single time because I don't check the "remember" checkbox, it's not terribly hard.

Freemium is almost always a scam, remarkably for games where it degenerates into "pay-to-win". As a parent of two young tablet users, I'll happily pay a decent price for any game they want, but I won't allow them to spend even a single cent in in-game crap.

You didn't understand what I meant by "discipline". I didn't mean best-practices -- i.e. programmers learning to not abuse openness without any help from the language. What I meant was adding the missing controls to languages (making them more similar to the languages James criticizes) so proper discipline could be enforced: visibility, module systems, restrictions to change core runtime classes, optional static typing etc.

I usually love James Hague's posts, but this one has his head buried deep in the sand. And he's enough of a veteran to remember early Lisp and Smalltalk systems, where excessive openness in all aspects looked awesome for prototyping/hacking or academic toy programs (or what is considered toy-size in the last 20 years anyway), but was a disaster even for the mid-1990's definition of programming in the large. Attempts to discipline these languages came too late, so they got overrun by competitors with lots of "paranoid" rules like C++, Java, hell even Eiffel. (Not the single reason of course but one important reason; not even the gurus could help themselves to not abuse dark magic and write application code that would be compatible across minor updates of the language/frameworks, let alone other compilers/VMs/platforms.) If you need extra evidence with more current technology, see most "bad parts" of Javascript (successful, but in the same way that the Titanic was wildly successful for one week; people who build large JS apps have been in a mad rush to fix or replace it for the best part of the last decade, hopefully with ES6 coming as a first major win in that direction).

TLDR sorry James, we have tried the elegance of extremely simple and open language/runtime architectures, and that was always an abject failure.

Yep, cities may have regulations for that, and they usually do these days.

And I don't necessarily agree with your preference. My family used to own a large, historical house that had a huge front wall because the terrain was very elevated from street level. And I can tell you from experience, most "graffiti" is worthless crap scrabbled by drunk teenagers without ANY artistic talent or ANY worthwhile message to the world. If you give graffiti a pass because there's the one-in-a-million Banksy, you should also tolerate ads everywhere because a few of them happen to be awesome.

Banksy's quote is quite ironic, coming from a guy that's well known as a master of publicizing his own work... even more, doing that by creating/exposing his work in "public space", using the walls of private and public buildings as a canvas without asking anyone for authorization.

Don't worry about that single time you've been (mis)contacted, recruiters are really a hit-and-miss even at Google. Your best shot is being referred by a Googler. You claim to have significant activity in the community and OSS projects so it shouldn't be hard to find Google engineers that have some familiarity with your skills. If you are a strong candidate, it's a win-win since whoever referred you gets a nice bonus if you get an offer and accept it. Once that happens you have the same challenge of resume/interviews as everyone else, the advantage of a good referral is mostly to get over the unintended barrier of recruiters' skills and time to find good candidates.

"the industrial revolution devised machines which, whilst increasing the efficiency of production, helped to increase the efficiency by which states and key individuals were able to extract wealth from others."

Remember that inequality was huge way before the industrial revolution. You know how feudalism worked, right? A few dozen filthy-rich noble families + 99% of population in abject misery, was the rule for most of Europe in the best part of the previous couple millennia. Situation improved with the ascension of bourgeoisie, but even that was limited to a small fraction of population that lived in big cities, in a time where almost everyone still worked the fields. The industrial revolution replaced old methods of economic exploitation with new methods, no big change for better or worse. Competition forced the bulk of industrial efficiency to benefit consumers; suddenly a good overcoat was not a luxury for the rich, etc. which started a virtuous economic cycle - and also meant that profit margins were NOT so fantastically big for capital owners. It's sure big fortunes were made by the barons of early factories and railroads etc., but the elites were already making tons of money before any new tech.

"people started to become aware of the inequality and the leaders and states started to see the result (in Russia and other countries) of this inequality being challenged."

People were always aware of inequality and injustice. The real change in the industrial revolution is that exploited workers were concentrated in cities, and even more, in companies / factories, so they could organize easily and fight for better working conditions, which was almost impossible for peasants living in tiny groups miles away from each other.

"What I believe has yet to be achieved is a balancing of the externalisation of costs with the need to build a system that is able to sustain itself. For the current system to survive, those who have need to find ways to increase the comfort and conditions of those who have not."

Agreed here. This balance is a never-ending struggle, any economic model is only sustainable when the bulk of society have disposal income to drive demand.

I hope tons of other computers, not just Lenovo's, that have Superfish will also be using the same certificate that's now compromised. Need more shit in the fan toward these guys.

What about knowingly putting consumers at risk? Suppose you buy a new car from GM and you later find out they've installed worn-out second hand brakes (on purpose, knowingly, and for profit motivation). But you're an old lady that only used the car to drive once a week, at 15mph to a church five blocks from home, so no damage happened. You're telling me that GM couldn't be punished for anything?

Java for Everything 12 years ago

I would rewrite that as "_explicitness_ improves readability". When I read Java code, I rarely have trouble to know what the code is doing (at least at a local scale).

Not all static-typed languages are readable because they're not all explicit. In C++ for example, even the most trivial snippet of code can be obfuscated by all sorts of abuse: operator overloading, implicit calls to copy constructors, preprocessor macros, etc. Scala suffers the same problem, perhaps even worse, doing tons of stuff automatically i.e. in a way that's not obvious by just staring at a code fragment such as an individual method. Organizations that have success writing large-scale code in such languages [I can speak for Google here], typically have careful style guides that ban the bad stuff and are strongly enforced by code review process; but in that case you're not using language X anymore, you're using some "safe subset" of X.

Of course you can't have any high-level abstraction without some tradeoff of maximum explicitness; virtual calls for example make hard to know which exact code is invoked by "just staring" at an invocation. The trick is striking a healthy balance between power and readability. Java is not perfect in this criteria (it errs a bit in the side of caution), but it's certainly much better than any dynamic-typed language.

You speak of "free market" but we're not in the 18th century anymore; advertising is a foundation of modern capitalism, as much as (for example) banks and the whole financial system. The economy is full of "overheads" that you can hate if you only look at their downsides: when you buy some product you are also paying baked-in fees for credit card processing, subsidies for agriculture or fuel used in transportation, and many other things. Yet we put up with the banks, taxes, government regulations, and yes advertising too, because all these things have a net positive effect. Speaking of banks for example, we all hate banks but let's be honest and tell me if you could hope to buy a house without a loan: most people would need to first save money for decades, which very few people have the discipline to do, or the resources to do as they simultaneously have to pay rent. So the mortgage system is clearly better, it enabled way more people to afford buying houses and in time this improves the market for everybody via economies of scale etc. (well, for 99% of us anyway).

One problem with paying individual websites is that you don't really want to create an account, providing your credit card information, to dozens of sites do you? What you suggest works well for heavily used websites (e.g. my daily feed of Ars Technica) but completely fails for stuff you visit every one in a while (e.g. my every-couple-months visits to The Onion). The existing ads infrastructure is almost perfectly suited to solve this problem.

And when you compare this to ad blocking, hopefully you realize that ad blocking is not the most ethical thing to do; you are effectively stealing content. Most ad-supported websites clearly forbid this with TOS wording like: "The copying, reproduction, ..., or other use or change by you, directly or indirectly, of any such Website Content, including but not limited to the removal or alteration of advertising, is strictly prohibited" (Ars). Not all websites are good players either, but if the advertising practices of specific sites are bad then your only ethical choice is to not visit them at all.