HNHacker News
TopNewBestAskShowJobs

delsarto

1,116 karma · joined March 30, 2011

submissionscomments
delsarto··on Where are the bones of Hans Holbein?
If looking for some isolation entertainment there was what I thought an excellent series "The Tudors" (https://en.wikipedia.org/wiki/The_Tudors) which is a fictionalised, but still fairly accurate in the big picture, retelling of Henry VIII's life, probably available on streaming services (Stan in Australia). I watched it in parallel with looking up most people who appeared on my phone to get more, and more accurate, details and found it all fascinating.

Hans Holbein plays a part as Henry's favourite painter and this is how I learnt about him.

delsarto··on Ansible Alternatives in Python
Stuff that gets too complex you can pretty easily abstract into a role and jump into Python.

https://opendev.org/zuul/zuul-jobs/src/branch/master/roles/t... is a nice example of some pretty complex co-install of libraries for testing under tox (and you can unit test bits of it too...).

https://zuul-ci.org/docs/zuul-jobs/ is a collection of roles and playbooks that do a lot of complicated things with nice abstractions such as this. Although they're designed to be called from the Zuul CI system, there's many good examples for anyone wanting to build out their Ansible in a scalable and maintainable way.

delsarto··on Moving Away from Gmail
As the recent changes to .org show, though, after a while the domain owns you rather than the other way around!

I am trying to move away from gsuite. The thing with forwarding from there is that it goes through spam there first, meaning you really have to check it (my accountant screwed up their spf records recently, leading to a lot of confusion). Using the account directly sucks, you have constant switching and gsuite accounts can't do things like family sharing.

Forwarding services, even implementing srs still can't rewrite dkim, so you get weird reply to addresses than again often trigger things ending up in spam.

I think the best solution while keeping everything together in the Google ecosystem (drive, docs, calendar, etc.) is probably an external provider you do pop from to your standard Google account, then offlineimap style backup Gmail somewhere else. Then you still have arbitrary delays in fetching!

Basically, everything is terrible.

delsarto··on Computer Science from the Bottom Up (2016)
Thanks, I believe this should be clearer with https://github.com/ianw/bottomupcs/commit/d8dfd3dc6be5795f4b...
delsarto··on Computer Science from the Bottom Up (2016)
Everyone who tries to create something eventually comes up against being told their work is flat-out garbage. Unfortunately I don't think there is a vaccination for it, and one must just take their chances and hope to build a mental immunity so it doesn't ruin your day. It's sad to say that many don't develop a resistance, and I think we lose many good contributors that way.
delsarto··on Computer Science from the Bottom Up (2016)
This was really seeded for me when trying to teach people taking computer science courses who were trying to do practical things like integrate C libraries into their higher level projects, but didn't really understand how things were working under the hood and getting themselves into a mess.

If they understood a little more about how their program was built and run ... from the bottom up, as it were :) ... they would have had less pain.

Of course, it just shows as usual the hardest problem in computer science is indeed, naming!

Edit: BTW you're right, "Code" by Petzold should be required reading http://www.charlespetzold.com/code/index.html

delsarto··on Computer Science from the Bottom Up (2016)
It is written in DocBook, which has become increasingly annoying to publish with and I think is, unfortunately, unmaintained now.

I have been considering some parts on containers and virtualisation which isn't covered at all.

The Itanium and PowerPC examples probably haven't aged well. There is no question that Itanium is a very interesting architecture with many interesting features, but now it is dead it's like deciphering hieroglyphs. I think I have to update these to ARM, or maybe even RISC-V to be more relevant moving forward.

So that would be my plans, as they were :)

delsarto··on Computer Science from the Bottom Up (2016)
I think in my mind at the time I was comparing it to Hennessy and Patterson; something that is obviously playing a in a completely different league!

Over time I have become a bit more realistic :) I've stopped worrying if it's better or worse than anything else. As long as it's factually correct, I think a rising tide floats all boats so the more we all write and read others work, the better off we'll be.

delsarto··on Computer Science from the Bottom Up (2016)
Yes, it has some rough edges. One lesson you can learn is probably not to write things like this, and just let what you have stand as it is, and incrementally improve it.
delsarto··on Computer Science from the Bottom Up (2016)
2016 probably
delsarto··on Computer Science from the Bottom Up (2016)
Author here ...

Yes as pointed out many times not "computer science" and I somewhat regret the name. However, it came out of me being a teaching assistant for people doing computer science degrees. A surprising number of people got to 3rd year operating systems courses without realising things like 2^10 is a kilobyte, 2^20 is a megabyte, etc. Let alone how a program was linked and loaded. I hope for this to be helpful, there are plenty of similar resources but sometimes the way one person says something resonates more than another.

I deliberately wanted to avoid x86-only to illustrate for similar reasons. Unfortunately Itanium proved to be a poor choice, ARM would have been better, but it gives me something to update if I get time! However, much of the basic content still remains relevant many years on.

delsarto··on One million lines of code ought to be enough for anybody
> (no file system would need a path longer than 260 characters, right? :o) )

This is poking fun at Windows' PATH_MAX, but it's very easy to hit BINPRM_BUF_SIZE's 128 character path limit for #! lines; maybe not so much for humans, but with CI systems installing things in weird deep directories (e.g. virtualenvs ... see https://github.com/pypa/virtualenv/issues/596).

So the old adage about glass houses and stones is still good advice ;)

delsarto··on Transposing Instruments
This works for trombones who might play in a brass band (where everything is Bb to ease moving between instruments). Read the treble clef in tenor clef (somewhat commonly used in orchestral settings for trombones) and 2 flats to the key signature (and use intuituion on accidentals :). Similarly can read Eb treble clef (e.g. baritone sax) parts in bass clef + 3 flats
delsarto··on I woke up unable to speak English
Doesn't even have to be that serious. My young son went off on a sleep walk once, came in speaking complete gibberish (like a random sort on a dictionary) but in a totally normal rhythm and cadence. After I regained composure and figured out what was going on, and redirected him he want back to bed, artfully working his way around the usual Lego detritus everywhere his path. So weird you can be basically unconscious but still so functional!
delsarto··on Man donated blood every week for 60 years and helped save 2.4M babies
I suffer from gout; there's a lot of theories about giving blood to help lower uric acid levels. Some people claim releif from symptoms after donating. In theory, it sounds plausable...

"Studies have shown that iron acts like a catalysis for the crystallization of uric acid. So if your iron serum levels are lower it will keep the uric acid in your blood longer to give your kidneys more time to remove it from your system."

https://www.reddit.com/r/gout/comments/70l8vp/reducing_uric_...

delsarto··on Origins of the finger command (1990)
Finger still has some use; you can take any running job from https://zuul.openstack.org, extract the uuid and

finger uuid@zuul.openstack.org

and it will stream the job logs to you. Most of the code in

https://git.zuul-ci.org/cgit/zuul/tree/zuul/lib/fingergw.py

delsarto··on A Year of Developer Journals with jrnl.sh
Of course there's a million things to do this; I wanted something very opinionated that simply turned a flat RST file that I keep every day (for consumption by me) into some lightly styled HTML (for consumption by others) so wrote rstdiary. I also keep a rough TODO list in there (it's either todo, or it's done and goes into a daily entry).

https://github.com/ianw/rstdiary

https://rawgit.com/ianw/rstdiary/master/sample/index.html

Been working for me for about 4 years. Once you get a bit of a corpus, it feels silly not filling in some points for the day to keep the thing rolling.

delsarto··on Bitcoin Blows Past $9,000
I love Bitcoin (and the broader ecosystem). The promise of great riches if you can survive long enough in a lawless new world, navigating the schemes, scams and intrigue and the government besides. It must be a glimpse of what got people to pack up and and head west for the gold rush.

The mysterious author, watching mtgox grow, collapse and subsequent revelations, "we found Satoshi" debacle, the DAO heist and reaction, altcoins, block size schism, ICO's, segwit activation, segwit2x deactivation and bugs, Teather's "theft", this rally ...

Chinese mining pools, Russian hackers, the dark web, struggles for control; it's like living in a Neal Stephenson novel. Worth the price of admission just for the entertainment value.

delsarto··on OVH outage explained
I think they're just large, complicated physical things where stuff goes wrong, even if you're maintaining and testing.

My best story was as a young student turning up for my helpdesk shift at about 5:50am to a phalanx of fire engines and the Hazmat team.

The generator in the basement was maintained and tested. This time it had started when power went out, but there was a pump that filled a holding tank from a 10,000ish litre tank under the building (speced to run for a week apparently). A pipe had cracked, and so it just kept pumping fuel on to the floor, carpark and into the local stream ...

The only person in the building overnight was the operator (tape changer and report runner) some 5 stories above all this, who eventually smelt it and eventually investgated. It was a massive nightmare, and the place stank for weeks.

Then there was the time the halon system went off unnecessarily...

delsarto··on An Open Letter to Intel
(Edit: removed silly comment about a personal interaction. The letter has also had addendums making the intent more clear. I will add "shut up on the internet" to the list of things I've learnt from the author)

I read this as, for want of a better word, snarky.

I'd bet if it wasn't Minix, L4 would have been on the cards. That's another microkernel that runs in coprocessors like your phone's radios that probably nobody will ever mention out loud.

delsarto··on Packaging Python software with pbr
For the first part, OpenStack fairly widely uses bindep (pbr is a pretty OpenStack ecosystem thing too). It's not really perfect, but it is a fairly standard way for a CI environment deploying from git to ensure the binary dependencies. If a project doesn't have a bindep.txt file, in CI it falls back to [2] for example.

I guess your second point means something like symbol versioning for Python libraries, which I'm not aware of any solution to, apart from just running things in a virtualenv.

[1] https://docs.openstack.org/infra/bindep/readme.html [2] https://github.com/openstack-infra/project-config/blob/maste...

delsarto··on How Google Wants to Rewire the Internet
There was a guy on Australian radio today saying that international traffic from Australia and NZ has decreased by about 70% over the past few years thanks to the ever-increasing usage of CDN's putting data, in most cases, within the ISPs network. Was something interesting I hadn't thought of.

He also mentioned that in NZ miserly data caps are really not implemented any more, since people just aren't using expensive transits as much (any NZ people confirm?)

Of course you wouldn't know about any of these savings by following the pricing of internet services in Australia. And the government seems intent on making anyone who cares for even basic privacy needing to tunnel their entire connection outside Australia (not to mention content providers and their geoblock rules).

delsarto··on x86: Approaching 40 and still going strong
> WRT Itanium and all VLIW processors for that mater, you have to compile for the microarchitecture of the processor to fully take advantage of it

True of course, but Itanium did think of this and had an "abstracted" VLIW where you worked with generic instruction bundles which the hardware was then more free to pull apart in different ways underneath. I do wonder, if we'd all taken a different path, if we'd be in more of a JIT-compiled type world. who knows?

delsarto··on x86: Approaching 40 and still going strong
Intel/x86 seems to have missed pretty much every major trend but somehow manages to keep up.

At the time, Intel seemed to have pinned the 64-bit future on Itanium. Which, on paper, is a much better architecture. Of course instruction parallelism should be in the hands of the compiler -- it has so much richer information from the source-code so it can do a better job. The MMU design was very clever (self-mapped linear page tables, protection keys, TLB sharing, etc). Lots of cache, minimal core. Exposing register rotation and really interesting tracing tools. But AMD released x86/64, Intel had to copy it, and the death warrant on Itanium was signed so we never got to really explore those cool features. Just now we're getting things like more levels of page-tables and protection-key type things on x86.

Intel missed virtualisation not only in x86 (understandable given legacy) but on Itanium too, where arguably they should have thought about it during green-field development (it was closer but still had a few instructions that didn't trap properly for a hypervisor to work). The first versions of vmware -- doing binary translation of x86 code the fly, was really quite amazing at the time. Virtualisation happened despite x86, not in any way because of it. And you can pretty much trace the entire "cloud" back to that. VMX eventually got bolted on.

UEFI is ... interesting. It's better than a BIOS, but would anyone hold that up as a paragon of innovation?

I'm not so familiar with the SIMD bits of the chips, but I wouldn't be surprised if there's similar stories in that area of development.

Low power seems lost to ARM and friends. Now, with the "cloud", low power is as much a problem in the data centre as your phone. So it will be interesting to see how that plays out (and it's starting to).

x86's persistence is certainly remarkable, that's for sure

delsarto··on For First Time Since 1800s, Britain Goes a Day Without Burning Coal for Power
What's the deal with natural gas? It doesn't seem "renewable"; isn't it extracted just like petrol? Is it just that it burns cleaner? Doesn't burning it still produce carbon dioxide?
delsarto··on Computer Science from the Bottom Up (2013)
Thanks, I wrote this!

It was a bit of a different time, when docbook was the way to publish, when Itanium was the 64-bit architecture, things like go and rust didn't exist and we used bitkeeper. But most of it is still relevant, and despite acquiring 2 kids since I started still have some ideas.

Yes yes, it's not Alan Turing-esque computer science. I have taught algorithms and data structures courses as well as operating systems courses to "computer science" students and this is more the second obviously. You gotta know both!

All I can say is that being a professional now for some time, anyone who knows this stuff is welcome in my team, no matter if we're bit banging hardware or writing JavaScript. When you have some concept of what's happing underneath, you write better code and, more importantly, are a better debugger.

I'm mostly cloud-y devops-y these days ... But when your CI triggers a kernel panic or a crash in some low level libray, it's nice to be able to go digging and send a patch upstream to fix it :)

delsarto··on Regular Expression That Checks If A Number Is Prime
tl;dr if you know a little regex

   - convert your number to a string of that length (1 = 1, 2 = 11, 3 = 111)
   - handle 0 / 1 separately
   - ^(..+?)\1+$
   - trick; the WHOLE thing has to match to return (^$)
   - first \1 match is "11", ergo string must be "11", "1111", "111111" to match 
   - second \1 match "111", ergo string must be "111", "111111", "111111111" to match
   - and so on.  if you find before length of string, it was not prime.
Clever trick. Look forward to being asked it in your next google interview :)
delsarto··on The Science Behind Honey’s Eternal Shelf Life (2013)
This actually discussed in Cooks Illustrated this month (issue 141 pg 28). They say to add a small amount of corn syrup to honey to stop crystalization.

To quote some bits "honey crystalizes when moisture evaporates and individual sugar molecules interlock ... corn syrup never crystalizes because it contains fragments of glucose chains"

So it seems like adding sugar (sucrose) doesn't do anything to stop crystalizing, but glucose does?

delsarto··on The Busy Beaver Game
Numberphile did a great video on Busy Beaver which I found easy to follow - https://youtu.be/CE8UhcyJS0I
delsarto··on Report from the VMware GPL court hearing
The wrapper is one way to look at it.

Another might be about reimplementation of APIs. The binary blobs could be evidence there is an API (even if you say you don't support it). If I reimplement it, is it derived?

So yeah, it's nuanced ... Otherwise I guess it would never have got so far

← PreviousPage 2 of 4Next →