Better HN
topnewbestaskshowjobs
Log inSign up

tech2

506 karma · joined May 14, 2016 (10y ago) · 213 submissions

Submissions

comment 4y ago · link · parent

I've occasionally toyed with the thought that political duty should be managed in a similar manner as jury duty.

(One of) The problems with political representatives is that they _want_ to be politicians. Either as a means to an end, or as a mechanism to better serve themselves or others like them. On more rare occasions you find the occasional altruist.

Since there's a selection bias going on, how can the current crop act as representatives of their populace when they aren't _like_ those they claim to represent?

comment 4y ago · link · parent

That's history coming back to bite it though. There was a period where the symbols True and False existed in Python but the bool class did not. True was _literally_ 1, and False was 0. Because of this, for backward compat, bool is a subclass of int.

comment 4y ago · link · parent

TCP/IP might be a reasonable example. There's a reason "network byte order" and "big endian" are the same thing.

comment 4y ago · link · parent

The Sony Xperia Z5 Compact was my previous phone that I'd had from 2015 until mid last year. It was close to perfect. Waterproof, headphone socket, SD slot. If a new version of that were released with less of a screen border than the original I'd buy it in a heartbeat.

Thickness could stay the same too, I'd like the additional runtime rather than everything needing to be wafer-thin.

comment 4y ago · link · parent

I appreciate, as described, some of your needs may differ from the standard format (I'd probably still use them to make interoperability between other l languages/people/systems easier though and have my comments etc. in documentation). However, with all that in mind I may not have communicated well enough about CSV as a built in.

> Most of my scripts are small, and adding libraries makes them more difficult to move around. So, I shy away from CSV as a format as a result.

The CSV library I speak of is part[0] of the python standard library. Unless you're working with a restricted subset of the language or something it should have no impact on the size of your script or its portability between platforms/locations.

[0] https://docs.python.org/3/library/csv.html

comment 4y ago · link · parent

Is empty string acceptable in place of None? If so, consider partition:

  key, sep, value = item.partition("=")
If you need to know whether there was a split/match that occurred you could test sep's truthiness.

comment 4y ago · link · parent

Given your example looks very much like python you could use the CSV module which is built into the standard library and handles all of this for you in a standards compliant manner.

You really do want to use a library to parse CSV since there are a number of corner cases. For example, your example code may not read a whole row since rows can have newlines in them.

comment 4y ago · link · parent

That 13W3 connector is the worst. I also had an Indy many years ago and getting an adapter together for it was a real challenge. These days I expect it to be somewhat simpler though.

comment 4y ago · link · parent

Sure, I guess my question is around why people would consider a line in a sea of space more legible than the same x-height font with less space below it.

I guess I could have an unusual take on this, but I find a lot of mono fonts seem to have massive inter-line spacing. So much so that their appearance is almost jarring to me. I find it disruptive to read. If I had issues with the legibility of a font then I'd increase its size, not the spacing between lines.

As mentioned earlier though, I guess I'm an odd-one-out here, I'm seeking to understand how/why my view here is unusual.

comment 4y ago · link · parent

Perhaps I'm missing why this is desired for fonts in general, but my tendency when selecting one for editing code is to use one with a smaller vertical line spacing to minimise spacing between lines (and therefore fit more lines on screen). Why do people appear to prefer the opposite (massive distance between lines)? I'm currently using Input Mono, not because I like it specifically as a font, but because it's relatively narrow, and because its vertical spacing is smaller than many others.

comment 4y ago · link · parent

An option here might be things like COM and DCOM. Individual, possibly embedded, components and a well defined communications mechanism.

Historically the Amiga was quite nice here with systems using AREXX to communicate (but not embed), and Linux/POSIX has things like DBUS for the same (but less flexibly since there's no middleware between the two for coordinating control between systems, the components need to know about one-another directly - kinda).

comment 4y ago · link · parent

Or Directory Opus. I preferred the version 3 approach with two side by side directories, but the current version is ridiculously configurable.

comment 4y ago · link · parent

Opti also make some pretty good zippers. There are certainly very few good manufacturers in this space though.

comment 4y ago · link · parent

There is a site I'd used a while back for exactly this when I was trying to ensure that my writing (and speech) in some fiction was gendered in a particular manner - https://www.hackerfactor.com/GenderGuesser.php#Analyze

Playing "guess why" is the fun part :) I'm sure there are other tools available now and I'd love to hear of them if people are aware of them!

comment 4y ago · link · parent

I suspect a lot of it would be the success of garage-based inventors, and the pure-R&D divisions in larger corporations (Xerox-PARC, HP Labs, etc.)

The former is likely harder to achieve now, much like how games development is now an affair involving large teams whereas games developed in the 1980s may have been single-person affairs. The act of making a computer and all related silicon is a much more complex affair, the last CPU design you could probably feasibly keep in your head may be the MC68000 .

The latter too is now still a thing, but much less open, and either rent-seeking through patent, or pure profit with lower tolerance for wild ideas (less risk tolerated for an obvious cost-centre).

comment 5y ago · link · parent

Early on in my Linux-using-life I made the mistake of deleting /etc. That was a learning experience like no other :)

comment 5y ago · link · parent

Assuming that your commute is around an hour means you're "only" paying £4k/annum (after tax) for that benefit. I agree there is a benefit to the commute (for me it was the walk/exercise), but I find it hard to rationalize otherwise and that's a willpower thing

comment 5y ago · link · parent

And this is where I really miss Sather:

  loop
    while!(condition);
    ...
  end;
for while, versus

  loop
    ...
    while!(condition);
  end;
for do-while, and

  loop
    ...
    while!(condition);
    ...
  end;
in place of:

  while True:
    ...
    if not condition:
      break
    ...
Alas, it never really took off.

comment 5y ago · link · parent

Capture One? Not cheap, admittedly, and you only get updates for the major version number you bought, but I guess it depends what you miss most about Lightroom?

Darktable has its fans as well, but I haven't tried recent versions.

comment 5y ago · link · parent

This might also explain why the Kiwi emergency number is 111 as a counterpoint to the UK's 999. Interesting!

comment 5y ago · link · parent

The same thing happened with BeOS many years ago. Initially their programming model was a thing of beauty. Then the POSIX layer arrived so that people could do exactly as you described. Some things should remain different.

comment 5y ago · link · parent

The Bivacor pump does have a pulse-like output, so I suspect some of the issues with earlier rotary pumps might not be so prevalent. Because it's a rotary pump though I suspect there's still issues with cell damage as they pass parts of the rotating assembly. The video claims that wide clearances reduce the risks of clotting from cell damage, but it's a reduction - not outright removal. See around the 3:40 to 4 minute mark on the video at https://www.bivacor.com/

comment 5y ago · link · parent

Sometimes fiction isn't too far from fact - https://www.theguardian.com/artanddesign/2021/feb/02/penthou...

They've taken the easy way out here by separating the two groups however.

comment 5y ago · link · parent

Both of the issues you cited with drugs (harm caused by action performed whilst on drug) and prostitution (coercion) are the crimes rather than the drug or prostitution itself.

Driving while intoxicated should certainly be a crime, as should rape, or forms of coercion like intimidation. These are one step removed from the acts themselves though.

With prostitution we should be acting to separate the violence etc from the act, and one way to do that is to not punish the victim. Provide support, reduce moral judgement.

Regarding sodomy (not just buggery, but onanism, buggery, oral sex, anything non procreative), I suspect the reason provided initially would be that it's preventing conception. This limits the expansion of a culture. The aspect of disgust came later (see ancient Greek consideration of the topic vs Abrahamic faith).

comment 5y ago · link · parent

> There are no penalties for making bad choices that only affect <<you>>. But almost every choice you make, good or bad, affects someone else.

Sure there are, easiest one to reach for is the consumption (or even ownership) of various drugs.

Beyond that there's prostitution in many jurisdictions, and no doubt there are other "victimless" crimes still on the books (basically those formed around morality - and therefore moral harm - rather than an otherwise identifiable harm or loss).

The problem with reaching for the "almost every choice you make affects someone" trope is that it's very easy to use it to justify any moral panic you choose. Sodomy (and by that I mean non-procreative sexual activity) is an excellent example whose laws were still active in some states up to 2014* (and maybe still).

* https://eu.usatoday.com/story/news/nation/2014/04/21/12-stat...

comment 5y ago · link · parent

I loved Permutation City. Have you read anything of the Orthogonal series by Egan? The Clockwork Rocket bent my mind and feels like harder sci-fi still.

comment 5y ago · link · parent

Perhaps not, I suspect that the pins are probably normally tied together. That it's possible, and some of the failure modes are _weird_ is a bit frustrating.

comment 5y ago · link · parent

Because of how the connector is laid out, it's possible for devices to not work (or to work differently) depending which way up you plug it in: https://twitter.com/mifune/status/1373564866443759617

comment 5y ago · link · parent

Ah well, thanks for humouring me. Good thing those query optimisers do the right thing on occasion.
12345
8