HNHacker News
TopNewBestAskShowJobs

tech2

506 karma · joined May 14, 2016

submissionscomments
tech2··on Why isn’t there a decent file format for tabular data?
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

tech2··on Multiple assignment and tuple unpacking improve Python code readability (2018)
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.
tech2··on Why isn’t there a decent file format for tabular data?
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.

tech2··on The cult of Amiga and SGI, or why workstations matter
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.
tech2··on MonoLisa – A font designed for developers
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.

tech2··on MonoLisa – A font designed for developers
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.
tech2··on Postman Now Supports gRPC
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).

tech2··on Toshiba T1100 – the laptop that was named a milestone of electronic engineering
Or Directory Opus. I preferred the version 3 approach with two side by side directories, but the current version is ridiculously configurable.
tech2··on YK22 bug causing Honda clocks to stop working
Opti also make some pretty good zippers. There are certainly very few good manufacturers in this space though.
tech2··on Cultures where men and women don’t speak the same language (2017)
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!

tech2··on Amazon is bypassing supply chain chaos with chartered ships and long-haul planes
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).

tech2··on I'm “still afraid to use spaces in file names” years old
Early on in my Linux-using-life I made the mistake of deleting /etc. That was a learning experience like no other :)
tech2··on Turmoil at Bezos' Blue Origin: Talent exodus after CEO push for return to office
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
tech2··on New Ways to Be Told That Your Python Code Is Bad
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.
tech2··on Receiving FLEXlm Error -88,309: System Clock Has Been Set Back (2020)
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.

tech2··on PAM Duress – Alternate passwords for panic situations
This might also explain why the Kiwi emergency number is 111 as a counterpoint to the UK's 999. Interesting!
tech2··on I hate almost all software (2011)
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.
tech2··on New generation artificial heart implanted in patient
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/
tech2··on List of Special Elevator Modes
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.

tech2··on Doing something is better than doing nothing for most people: study (2014)
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).

tech2··on Doing something is better than doing nothing for most people: study (2014)
> 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...

tech2··on Neal Stephenson – Announcing Termination Shock
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.
tech2··on USB 3.0* Radio Frequency Interference on 2.4 GHz Devices (2012)
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.
tech2··on USB 3.0* Radio Frequency Interference on 2.4 GHz Devices (2012)
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
tech2··on Speeding up SQL queries by orders of magnitude using UNION
Ah well, thanks for humouring me. Good thing those query optimisers do the right thing on occasion.
tech2··on Blake 32
Double-bonus, 32 is also the word count of poem plus title (sans author name).
tech2··on Speeding up SQL queries by orders of magnitude using UNION
Perhaps I'm missing something, but why is query 2's meal_items a left join when the where clause then forces it to act as if it were an inner join? Would changing that have any impact?
tech2··on Lena
Altered Carbon also heavily featured this idea. Parallelised faster-than-realtime torture, fuzz torture in many ways I guess, with presets to make the subject more compliant to start with.
tech2··on LiquidPiston's “inside-out” rotary X-Engine wins Army research contract
Cosmo, Luce, RX-2, RX-3, I think they even did a Familia at one point.
tech2··on Systematically removing code
Is using mypy for gradual typing not an option open to you?

http://mypy-lang.org/

← PreviousPage 3 of 7Next →