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

For later hardware like the TRS-80, the BASIC interpreter had an escape hatch: PEEK(addr), POKE addr, value, and USR1(). Basically you could read and write single bytes to RAM, and there was a magic 2-byte value which was a branch address that calling USR1() would jump into. So you could bootstrap some simple tooling that way. (I'd been writing hex machine code before I got any hardware, just pencil and graph paper, so it wasn't a big step to go from that to stuffing bytes into memory.) Of course there were tools available but actually paying for them was enough of a challenge that a lot of bootstrapping got done entirely anti-economically :-) (Once floppy drives and disk operating systems were a thing, you'd usually have a simple debugger where you could just type hex digits in, and load register values directly - so if you wanted to read raw disk sectors, you'd drop CD 75 46 18 FB somewhere, R DE track/sector, R HL where to read, R BC 0001 and then single step the code and it would read a single sector.)

(Note that while a lot of this was unjustifiable even then - my first real paying job in computers was down a step, working on a Z80-modded IMSAI so while most code was on 8" floppies, doing machine code in binary on toggle switches "just to fix something quick" was a legitimate skill :-)


"we" being him (ie. not the reporter) because he's part of the executive branch; that's the limit of the authority of the executive order, after all...

The Pentagon has six zipcodes and they're divided up by floor.

(My standard example used to be the World Trade Center, which had two - not one for each tower, but one for the state government offices and one for everything else.)


This is a much better point that I didn't even think of!

Unless they're part of the executive branch that order doesn't apply. (Which is kind of too bad, under the "if it actually works it gets a name and isn't AI anymore" rules we need a new name... but This Isn't It.)

Heh, flashbacks to Adero - a y2k-ish startup to do "the Akamai thing" but with XSLT running on our edge nodes, so you could have sophisticated personalization while the upstream site had hugely cacheable snippets. (One of our reference examples was a sports news site where you specified your interests and got a custom "newspaper" - assembled in our edge servers, not your browser.)

(I suspect if you had a catalog of "ways your startup can choose badly" for that era, we hit a lot of them. My top 3 were "attempt to do server balancing with a day's worth of latency data, using a perl script that took more than 24 hours to run and sometimes failed entirely", "Having a 20 person IT department to manage an outlook server for a 100 person company", and "Offering a senior engineer a VP position with firing authority to fix the outlook problem" :-)


For a lot of places, handling this kind of incident response was "eating your vegetables" preparation that has just in the last couple of months turned into "for me it was Tuesday"...


Grammatik ran in 64K of RAM on a Z80 running CP/M. (The binary included a Forth interpreter so there was a lot of straight up code compaction.) So yeah, you could catch a lot of common English-language infelicities in a startlingly resource constrained environment... in 1983. Certainly a lot more than typos.

(The reason I remember this bright and shiny data point is I spent a week or three reverse engineering it and getting access to the inner interpreter; the office staff actually used it, though.)


As far as I can tell, the reason for the lack of companies is that they've made it impossible to monetize "software for other people" and apparently vast swathes of what used to need management are now "I can just build the parts of that I care about, it doesn't have to be good enough to ship to anyone else." (This horrifies me, though there is a silver lining: the value of the "idea guys" has also gone to zero :-)


So negative that the first I heard about this was with the title "New York Times adds glue to its Cooking App. Users aren't thrilled" (presumably from someone who read the niemanlab article before I did)


Nice thing about this one is that we have the implementation details right in the article:

    mbedtls_ssl_conf_dh_param_bin(conf, dhm_p, sizeof(dhm_g), dhm_g, sizeof(dhm_g));
The first sizeof(dhm_g) should have been sizeof(dhm_p). So, do you attribute this to a simple typo (hard to catch at a glance due to similar letter shapes), "single letter variable names are bad" but the wikipedia page on DH also calls them p and g - it takes a little digging to get that "root" and "modulus" would have been better names, but maybe having them directly match the most common form of the equation would have made them easier to review...

Or do you just add it to the list of C crimes, that "passing storage length and pointer" is maybe the worst possible way to return written-to storage from a function :-)


Yeah, this is just C doesn't have fat pointers. Fat pointers were proposed for C89. In some alternate universe C89 has fat pointers and in that universe probably by now many of the weird 0-terminated APIs we're frustrated by work on fat pointers instead and we're all better off for it.

A fat pointer is one ordinary thin pointer, plus a pointer-sized blob of extra information, commonly a length. Examples would be Rust's &[T] slice reference, its &str string reference and a pointer for dynamic dispatch &dyn Shape in which that extra blob is pointing to a v-table of functions for how this particular type implements the Shape trait.


At first glance I almost misread this as a different C crime, since the declarations aren't in scope... uint8_t dhm_p[2048]; and uint8_t *dhm_p = (...)malloc(2048); both make dhm_p a reasonable pointer to 2k bytes of storage and are totally suitable for that argument, but sizeof the first one is 2048 and sizeof the second one is 4 (or more likely 8 these days, but this is specifically code from an embedded web server so I can say 4 :-)

But no, the actual problem was so much less subtle.


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

Search: