HNHacker News
TopNewBestAskShowJobs

ralph

1,089 karma · joined March 1, 2007

Ralph Corderoy, https://plus.google.com/#115649437518703495227/about

C, Unix system and shell, Python, X Windows, ARM, ...

submissionscomments
ralph··on SPDY for Rest of Us
I expect some at Google are cogitating over replacing the current certificate method.
ralph··on What Powers Instagram: Hundreds of Instances, Dozens of Technologies
Thanks seldo, interesting. Just been looking at a client's Amazon dashboard where they have a small set-up running, not something I normally deal with but I see their RDS is billing over 2e9 I/Os/month and ends up being a significant part of the non-fixed bit of their bill. I suspect their MySQL queries are doing table scans and building temporary tables for some of the queries; these would both up the I/O count as all RDS storage is EBS, even temporaries?

So if your MySQL storage is ephemeral how do you cope with outage? Replicate it off AWS?

ralph··on Easy 6502 - Learn the 6502 Assembly Language
I thought the original post was wrong to choose 6502. "So, it was designed to be written by humans. More modern assembly languages are meant to written by compilers, so let’s leave it to them. Plus, 6502 is fun. Nobody ever called x86 fun." I assume he's never written ARM. It was designed to be written by hand, is delightful to write, much more orthogonal than 6502, and still relevant today.
ralph··on Easy 6502 - Learn the 6502 Assembly Language
BBC BASIC tokenised BASIC keywords before the line was stored in memory, e.g. PRINT was represented by a single byte. Some tokens needed more than one byte, especially in later versions.

But I'm talking about assembler here. BBC BASIC has a built-in assembler, e.g. 6502, Z80, or ARM, depending on the CPU it's running on. The assembler source in the BASIC program is not tokenised on input but stored as plain text. Instead, when those lines of BASIC, since that's what these embedded lines of assembler, wrapped in [...], are, get run the machine code is assembled at the address in BASIC's P% integer register variable and P% is moved on. At that point of execution BASIC must hunt for the mnemonic, stored in the "tokenised" BASIC line as plain text, in its table; the table I reference in the case of ARM BASIC. That table can be laid out as it is because each mnemonic is three characters long, e.g. mov, ldr, stm, and bic.

You mixing tokenising BASIC, which BBC BASIC did, and the embedded ARM assembler, which it didn't, and then adding in an "assembler's editor", and there wasn't one of them. Just lines of BASIC program, 10, 20, ..., some of which switched to assembler with a [.

ralph··on Easy 6502 - Learn the 6502 Assembly Language
STA is `store accumulator' not address. Would you have liked to type STORE_ACCUMULATOR with the high frequency that the instruction occurs on an editor that had no auto-complete? Even reading it is slower than STA. And having them be all three letters meant assemblers could pack the text into memory in fixed-length records; every byte mattered.

Here's the table of ARM mnemonics in the source to Acorn's BBC BASIC for the ARM. https://www.riscosopen.org/viewer/view/castle/RiscOS/Sources... For the 6502, space was tight enough that it was packed to less than three-bytes per mnemonic.

ARM was born from Acorn's frustration with 16-bit CPUs that they considered as successors to the 6502, e.g. 68000, not the 6502.

ralph··on Tarsnap now available to residents of Canada
Didn't know if you were reticent to blow your own trumpet so thought I'd give a helping hand. Didn't realise a blog post would be in the offing; sorry.

Perhaps next time publish the blog post, submit here, then the announce list email, then the individual customer emails, that way you wouldn't be tipping off lots of possible submitters before you're ready. :-)

ralph··on Tarsnap now available to residents of Canada
Announcement: http://www.mail-archive.com/tarsnap-announce@tarsnap.com/msg...
ralph··on Tarsnap now available to residents of Canada
7(b) is new and 13 has been changed from "You may not use the service if you are a citizen or resident of Canada".
ralph··on Illegal Engineering
He refers to it again later; "Engineering apprenticeships have been decimated, and even the old metalwork shops in schools have gone, replaced by ‘craft, design and technology’, which seems to mainly involve making things of cardboard."
ralph··on Stop worrying about Time To First Byte (TTFB)
Didn't TTFB become popular because back then the start-up/handover time of the request from the server to the URL handler, CGI, FastCGI, etc., was significant depending on the handler's language, ... Far less significant now. Cutting TCP packets with compression is much more useful.
ralph··on Things I like about programming in Go
Yes, it can return a tuple, in Python-speak, and has a pre-declared error type. http://golang.org/ref/spec#Errors
ralph··on Tarsnap outage post-mortem
True, but if that bus does one day get him then we'd probably hear about it pretty quick on the grapevine (he didn't squeal, just let out a little whine) and start making alternative arrangements en masse.
ralph··on Golang at CloudFlare
It's almost like sometimes it would have handy to do

    case ch <- defer foo():
and only have foo() be evaluated if ch is ready for writing and also chosen amongst the cases. As the (fixed) code stands either the Sprintf() and Sum() or Count() is wasted on each iteration. I suppose in some cases you can calculate the initial values before the for-loop and then replenish them in the case: when they're used.
ralph··on Golang at CloudFlare
Hi John, https://gist.github.com/3039932 has problems; w.Count() is evaluated every time around the for-loop even if the result isn't sent down the count channel. See http://play.golang.org/p/pbCX13my0q where I've altered lines 60-62 yet there's still only "29 bytes written".
ralph··on Golang at CloudFlare
Have you done the update now? Only there's a NewCounter() that's called but not defined and the text says "it can be passed to counter.New".
ralph··on Leap second causing Linux server crashes?
Yeah, sorry, I know they're the public DNS, but they're also jolly handy as unforgettable IP addresses you expect to be able to ping, hence the smiley.

Good news about the time{1..4} NTP servers, I'll give them a try, thanks.

ralph··on Leap second causing Linux server crashes?
So a VM on G's Compute Engine could in turn run an NTP server that exported G's Production Time? Do I also see GPT on App Engine?

Any chance Google could just make a GPT NTP server available as a public service anyway, just as 8.8.8.8 is their public ping responder. ;-)

ralph··on Numbers.vim - better line numbers for vim
Do you use (){}[] and others to move about? I rarely need to know the line number to move to on the screen.
ralph··on Station Maps - a collection of 3D maps of London Underground/DLR stations
Sorry to criticise but it wasn't what I expected. I wanted to see the pedestrian tubes I used to walk down as a kid represented, as tubes. To see them as flat walk-ways doesn't give the same impression.

That said, would be nice to see it expand and perhaps even join up with plots of the train tunnels too.

ralph··on ZeroMQ - Disconnects are Good for You
Did you use something else instead or just decide not to design around message-queues at all?
ralph··on Things I Love About Go
You could be right about the spec. I think gccgo no longer does one OS thread per goroutine as of Go 1.0 but I've been unable to find a clear definition to point to.
ralph··on Things I Love About Go
Ada's tasks aren't defined to be greenlets; an implementation can make then OS threads or processes, limiting their number. And rendezvousing is more cumbersome than channels, e.g. passing a channel over a channel.
ralph··on Things I Love About Go
Sorry, but having had some dealings with Ada many years ago I'm sure Go is little like it. Go has CSP in its ancestry, what with channels and goroutines, and both are fundamental to it whereas Ada has nothing similar?
ralph··on The Little C Function From Hell
No, you get room for one more negative int. x = x < 0 ? -x : x; is a common buggy abs(), e.g. when printing an integer. One should test if it's negative, perhaps print the '-', and then ensure it's negative for the rest of the per-digit code.
ralph··on Actually using Ed
Nice try, but efficiency aside, it breaks.

    $ sed '$G;1h;1!H;$!d' <<<foo | hd
    00000000  66 6f 6f 0a 0a             |foo..|
    00000005
    $
ralph··on Actually using Ed
sed is great but it's a stream editor; try moving the last line to the start of the file.
ralph··on Actually using Ed
I think knowledge of ed helps learning vi, just as knowledge of all the Unix programs that come before help learning Perl because it has so many influences. It always bemuses me that some people try to learn it as their first language. :-)
ralph··on Actually using Ed
DOS's edlin is a very crude line editor, unlike ed(1) which has regular expressions, the g// command, etc.
ralph··on Actually using Ed
I've used ed and other commands on headless systems more than once, back when networks weren't common. One has to be careful of typing and having a bell can be useful for reassurance; grep newthing foo && echo ^G.
ralph··on Actually using Ed
It probably also has vestiges of the assembler version in its structure and symbols. troff(1) certainly has; I had trouble groking one particular function's logic and asked Kernighan. He kindly replied and said that one had always troubled him too and was just a transliteration from Ossanna's assembler. Glad it wasn't just me. :-)
← PreviousPage 8 of 26Next →