HNHacker News
TopNewBestAskShowJobs

TristanBall

168 karma · joined June 25, 2020

submissionscomments
TristanBall··on Regex character "$" doesn't mean "end-of-string"
Regex's predate perl quite substantially. Think grep and friends if nothing else.

Certainly making the perlre library available separate to perl encouraged its widespread use, and lots of others copied or were inspired by it.

"Popularized" doesn't seem like quite the right word though, I don't disagree with the point, but if I shout "Hey everyone let's write regex's" at the office people throw stationary at me, which is not true of other popular things!

TristanBall··on Comparing dd and cp when writing a file to a thumb drive
Bash not so much, Ksh93 will do this, playing with has been a recent toy project. Typeset -b to specify a binary variable, rean -n/-N and print -v.

It can be really quit surprisingly fast too, 4GB/sec reading /dev/zero writing /dev/null. ( yes 40gbit/sec, binary copies, in a shell script!!! ). 2-3GB copying real data.

Oh boy but the edge cases and quirks.. there are so many reasons why this is a bad way to do things..

Curiously, I double the speed bu unsetting and recreating the buffer variable for each op. There also seems to be cases where ksh will buffer reads from a pipe to allow limited seeks, but also if you do a read -N from a pipe with too large a size (>8k I think, I'd have to check) and that read can't be completed because the source finished writing less than that, then that data is gone. Less than 8k, you can still read it with a subsequent read -n.

Probably the most actually useful thing I learned was that by ksh93 creates its pipes with unix sockets, not pipes, which means the buffer size is set by /proc/sys/net/core/[w|r]mem_default, rather than a fcntl call. That makes it easier to tweak from a script, and also makes ksh pipes faster by default for many streams, compared to most other shells ( depending on block sizes, and the difference goes away if you tweak up the pipe buffer size )

Don't get me wrong, not something I'd use in real life, but it was fun anyway.

TristanBall··on I'm skeptical of low-code
I totally agree on the "IT empowerment" perspective, but unfortunately the price model of these tools makes it hard for many IT departments to introduce them, at least in established corporate environments, for internal use. Startup and public facing stuff is different of course but my experience is medium enterprise internal IT..

Per end user rather than per developer means they're far too expensive to introduce as a general IT toolbox item, they need to be part of a major strategic project where the $5-30/month per staff user has a hope of being justified.

But that also often takes it outside the "IT Dept", which is often just "infrastructure and pc fleet" support, not development ( at least, that's my experience ). IT might do internal scripting and some service interface tooling, but business tooling and software is rarer, that's usually either dev teams or ERP teams. The ERP teams will already using ERP platform tooling, so that further narrows the market.

I don't have a good solution for this, but it's always been the hurdle I've tripped on working for medium size enterprises.

There would seem to be an opportunity for "open source platform, commercial training and support" here, but vendors seem to gravitate to per user head and cloud only for more immediate revenue and easier support., but again many enterprises still have huge internal only IT landscape's, because cloud is still expensive and the value often isn't seen in relatively static envs.

It's possible this niche has been filled now too, it's been a while since I looked...

Possibly they can be introduced on a "just those who need it" basis, but honestly that's just so bloody tiring for internal tools, not to mention demotivating as you can no longer build tools for "everyone or anyone", it's back to specific narrow business cases, not IT empowerment, but narrow business case also means your usually competing with cots tools or consultants.

TristanBall··on Intel 80386, a Revolutionary CPU
While I got the 80386 programmers manual as one of my teen birthday presents.. I only ever actually did a little ASM programming but I loved that book anyway and read it a lot.

Really annoyed at myself that I got rid of in some fit of "well, I'll never use that again" cleaning some time.. especially given somehow still have "Sendmail, edition 2".

I might read the 386 book for nostalgia.. the Sendmail one..well, PTSD isn't something you get nostalgic about!

TristanBall··on Google is building a subsea cable linking the US to Australia
Probably not much. I'd love to be wrong tho.

Best possible fibre speed LA to Sydney is about 120ms. Not sure what the minimum additional latency for packet handling is.. but I did a few test..

Via one looking glass service, I get 215ms, LA to Melbourne. Traceroute shows 12 hops.. but the path goes via Perth and Singapore....

Via another, I get 170ms, traceroute shows 22 hops, but with a more direct physical path, at appears to go Sydney > Hawaii > LA.

I was going to dis Telstra here because the first lg result is from their pop in LA.. but the second result includes a bunch of telstra hops - although the international ones appear to be level3

The first one appears to be telstra for the international hops so maybe I can bag on them.

My point t being that there's already faster that 250ms available, but we're at the mercy of the providers routing policies.

So I guess it'll help if it convinces telstra there's a competitive reason to improve.. but I'm sceptical in the short to medium term.

TristanBall··on People are speaking with ChatGPT for hours,bringing 2013's Her closer to reality
Ha. My response to this was a very visceral "eww".. but I also realise I'm not normal. Not super keen on small talk with humans either tho tbh.

I somehow fell off the tech nerd train and wandered onto a Luddite bus. I find myself supremely uninterested in the current AI hype, especially given I realised early on that the math was beyond me, so I felt I couldn't get a proper grasp "under the hood"

But it's also very clearly possible my first conversational interactions with these systems might happen without my even realising that I'm not dealing with a human. Might have already happened.

TristanBall··on Not knowing the /proc file system
You seem to have very similar races here though?

Perfectly possible, even likely, for a process to end between "find" finding it and awk opening it... especially given the pipe buffer between the two.

Personly I'd rather an "expect errors" approach.. break it out so that you can easily treat a failed open as a "continue next" scenario and hide just those errors

TristanBall··on DSLs are a waste of time
The point, I think, is not how widely used it is, the point is that you become beholden to a single, often corporate vendor.

I'm not actually sure what made the transition from VB classic to the DotNET version so disruptive, and so damaging to VB in terms of popularity and mindshare ( possibly that C# was better while still sharing enough of the benefits? )

But from everything I saw it was. VB mindshare just fell off a cliff from everything I could see.

I mean, you could say similar things about the damage and disruption about perl->raku and python 2->3, which are both effectively single implementation ( ok, less true of python ), but the end result seems very different.

Perl5 is still nearly standard in linux/unix, especially anything not embedded or real-time, while raku is niche, although perl5 is more and more niche despite that, with many, many haters..

Python 3 is probably as popular or more so than 2 was

VB is an also ran in DotNET languages.

So, I dunno, I think there might be more to it that just "single implementation is risky". "Single corporate owner" might be a better one, idk?

TristanBall··on Ask HN: Why hasn't the cloud killed the mainframe?
I've never heard p-series called mainframe, and while it's been a while, I've both used and sold them ( as a side effect of that company's app often being sold bundled with a p-series )

While there's technically overlap in performance between the lowest spec Z and the higher end P, and these days lots of performance overlap between P and X ranges, P-series is called "midrange" by everyone I've every met.

The Power hardware has been the basis for both the AS-400 and P-Series/AIX line for a long time now, although you can buy p-series with linux too.

As an asside, AIX, with the exception of its volume manager which irks me deeply, is an incredibly usable Unix.. I mean you can really manage the whole thing via the SMIT UI without ever touching the command line. Not my preference, but you can. Some things, like cpu usage reporting are still better on AIX ( core utilisation via hyperthreads for example )

I'm still not a fan as such, mostly I'm annoyed by how good it is, but credit where credit is due.

Of course there are some people, (usually older but not always), who will call any server, or anything in a server room "the mainframe", in the same way the any desktop tower gets called "the cpu" (technically correct via some broader definitions but still..), or they'll call whichever office app they primarily use as "Microsoft", and of course you need to take that into account when communicating with people, the the incorrect usage of mainframe seems pretty rare these days just because mainframes themselves are rare.. and people in businesses who have them generally can distinguish.

TristanBall··on File Attachments: Databases can now store files and images
"Filesystems (eg. Ext4) usually think about whole blocks, but are designed with the eye for smaller files, i.e. files aren't expected to be more than some ten or hundred blocks in size for optimal performance."

Sorry what?

I mean, ext4, as a special case, has some performance issues around multiple writers to a singe file when doing direct io, but I can't think of a single other place where your statement true... and plenty where it's just not ( xfs, jfs, zfs, ntfs, refs )

TristanBall··on Modern CSV version 2
Duckdb does this straight from csv. You can treat them pretty much just like un-indexed tables, including queries, joins and output back to csv or parquet. its

Really nice.

TristanBall··on Got called to a professor’s office after a complaint his SPARC4 was running slow
I'd guess orders for these probably skew to the higher end.

If you're putting workstations in racks it's either to share them, or due for power/cooling/noise reasons, and the fact that you've got a workload that justifies having those kind of problems probably means all your other costs will still dwarf hardware.

There's usually a large premium on whatever the current largest size dimms, ssds and the top 10% or so of cpus and video cards. So I expect they sell a lot of machines that are "50%" size ( either max physical capacity with 50% size components, or half physical capacity, with 90-100% components ), and a fair number of maxed out just because it will often be cheaper to have 1 maxed out option then 3 smaller ones, and budgets don't matter except they do.

Places who cost engineering time at $100k/hour won't blink at $100k computers if it gets the job done.

TristanBall··on Wireshark Is 25: The email that started it all and lessons learned along the way
It answers, or at least gives the definitive first clue behind a huge number of slow downs or apparent hangs, given how many of those are actually blocking resource waits or retry loops gone mad.

It's probably most useful to sysadmins working with binaries, or even if you do do have the source, it's usually a shorter path to the solution for any app/os interaction problem.

It's useful for certain classes of optimisation and tuning, because it will give timings and aggregate timings.

I'll use it for things as simple as "where is this program reading it's config files" - often useful when doco is poor and/or there are multiple config locations selected by conditional logic.

There's an "ltrace" as well, for share library tracing, although I've personally found that less useful - bugs that that shows are more likely to be code/logic problems rather that os/infrastructure interaction - which is to say, usually outside my job scope.

On commercial unix, the equivalent to strace is truss, and it's been around forever.

Like many, wirewhark, strace/truss are my go-to tools for a huge amount of troubleshooting.

TristanBall··on Simple Unix Chat
Bash and zsh both allow:

  function /usr/bin/cat { echo hello; }; 
  /usr/bin/cat
  hello
So specifying a path isn't as useful as it seems
TristanBall··on The 90s Developer Starter Pack
Some "new" hdds are absolutely insanely loud.. I got some recently where having 3 in an otherwise quiet case made them very audible from the other end of the house! I sent them back.

Looking at the datasets for the WD Red Pro for example, there's idle/peak dBa from 34/38 for the 10TB to 20/32 for the 20TB

34 dBa idle. Are you kidding me?

I ended up settling on the 18TB btw, as that's all there was at the time, 20/36 dBa.. and quite happy with them, and they're "normal loud". Noticable sitting next to the pc, more so when active, but not from more than a few metres away - and ZFS doing a scrub no longer sounds like a an industrial accident either, so thats nice.

TristanBall··on Cases where full scans are better than indexes
Can you clarify?

I don't think I've ever seen such a cliff where the database is using the same query plan? There's sometimes small incremental slow downs as you pass btree depth thresholds and have to add more, but tbh even that's not usually noticeable.

I have seen plenty of instances where the database decides an index is no longer the right access,but gets that wrong, and the result is terrible.. but I see that as a different issue.

TristanBall··on The Case for Bash (2021)
"If bash is invoked with the name sh, it tries to mimic the startup behavior of historical versions of sh as closely as possible, while conforming to the POSIX standard as well"
TristanBall··on Fulfilling a reader's request for my “dot files”
I've moved to two line prompts everywhere as well, the second line being basically just " > "

I've also added inter prompt spacing.. first that was just an extra \n before the prompt, but I decided I wanted space between the prompt and the start of program output, as well as between the end of output and the next prompt.

I can't remember where I stole the idea from to give credit, and it feels a little wrong but works really well:

For bash, in PROMPT_COMMAND, set a debug trap that writes a newline, and then removes itself "trap - DEBUG".

If it's not obvious the debug trap fires right after you hit return, but before the command actually runs ( also making it a nice place to update xterm/tmux titles ). So that gets you your post prompt newline, but then because the traps removed it doesn't keep firing for every command in you for loop or whatever. But PROMPT_COMMAND adds the trap again for the next time.

I also have some weird logic in prompt_command that only adds the preprompt newline if the cursor isn't in column 0, because I found otherwise I was getting unnecessary extra spacing.

So yes, if I hit enter on a plain prompt I get two blank lines before the next one.. so?

But it makes differentiating output so much easier. Combine with colour prompts with timestamps ( and in history too ) and I get at least rough timing on how long tasks take, which is often useful.

It's actually on monochrome terminals (for whatever dumb reason that might be happening) that it helps the most, to the point where now when I see a non customised terminal my reaction is "urhg.. what's all this mess, take it away" <shooing wave of hands>

That and pspg for database/csv viewing make my daily life measurably better.

TristanBall··on Interlaken: The ideal high-speed chip-to-chip interface?
How does this compare to something like pcie? Why would someone use on over the other?
TristanBall··on The Red Hat model only worked for Red Hat
Well, there's two very different views of reality.. And one of them appears to be from a very unhappy customer.

Is it possible that different IBM Depts - or IBM regions, are selling Redhat Software/Support without much actual involvement of the Redhat business? Like the might have done in their traditional reseller/consulting/support role?

TBH I actually think it's likely - sales and account execs can probably just tickbox add RH stuff to their package deals, copy&paste the slide deck - and post sale the customer support channel will be the general enterprise support one. IBM are probably very deliberately channelling all first level support through there anyway, same as for everything else - so core Redhat support staff might only get looped in for 2nd and 3rd level issues for those accounts, if at all.

It's quite easy to see that effectively creating two sales/support channels depending on whether you "bought from Redhat" or "packaged from IBM" - but equally it's unlikely to be presented or perceived that way, until it's too late.

I believe you when you say they've been hands off - it's surprising, but I can also see how it would make this kind of situation _worse_, because they're still effectively treating redhat as an "external" provider they resell.

Not that fully integrating the business would make it better of course, probably just different worse ( just based on my experience of corporate mergers, not IBM specific... ).

TristanBall··on Man beats machine at Go in human victory over AI
Shortly to be followed by:

AI, "Humans will take all our jobs!"

TristanBall··on My review of the C standard library in practice
As i understand it, IBM I does this, amongst others. I can't speak to what impact, if any, I had on c tho.
TristanBall··on Sun: The Network Is the Computer
I was a sysadmin in a windows desktops + sun/windows server env for about 10 years from 1999

I loved our sun boxes, hated that we could only ever afford their "midrange" models, and then only from grey market resellers, or outright second hand.

Everything being said here is pretty much true.. but the additional factors I'd call out were vmware and to a lesser extent "componentised" infrastructure systems.. I'm thinking blade servers and sans. If I bought a sun box, it was only a sun box. If I bought an intel/amd, then it could be linux or windows or both. Yes we could, and did, hook the sun boxes to SAN's, but I don't remember sun ever having a particularly strong blade offering.. or maybe it was just priced and like sun hw, either way..

Dell Blades let me do incremental upgrades at price points within individual projects sign off budgets, and dell delivery times + San boot + esx meant I could usually have new systems up and available in a couple of weeks.

That sounds bad in the cloud era, but before that I'd probably still be trying to get quotes or negotiate discounts, so it was fantastic.

Linux and the other bits above let me say "yes" to user requests more often, with lower friction and shorter deliver times.

I can't tell you just how nice that was.

Then I started work at an aix/linux/windows shop and the whole cycle repeated...

TristanBall··on The golden era of being an open startup is gone
Right. And the the my job/work/boss sucks trope is so relatable because?

There are many reasons people stay in a particular job, good and bad, but those same reasons allow for a lot of "employees neglect".

You have to neglect a lot of employees to an extreme level, for a long time, for it to actually make a significant difference. Mostly, you'll loose a few staff, who'll be replaced by new, keen, eager to please/succeed staff who's enthusiasm effectively mitigates poor management, and who's "tolerance for sh.tty management" counters have been reset to 0.

TristanBall··on Rewrite, refactor, or reinvent? Lessons from 6 software rewrite stories (2019)
One of the things I've had my nose rubbed in several times is just how very effective some of of those "legacy" languages - like Cobol or the various 4GL's - are for writing business systems apps.

It clicked for me when I started thinking of them as DSL's, where the "domain" is "business stuff" ( or equivalent, government data processing etc ) Of course they have limitations - but they're also often part of a full platform and very opinionated as to app and data model, and within those constraints programmers can be crazy productive.

So many of these rewrites fail, and I think a big part of it is people don't fully realise the ramifications of the fact that they're replacing both a platform and a system built on that platform. Sure, there's probably a wizzbang new architecture, which well intentioned smart people will be able to prove improves on that platform in every way - with reams of documentation about the choices made and the way things work... but they're still choices, and sometime they'll get misunderstood, or ignored, or subverted by people who think they know better or who just need a short cut - and it's often big enough project that staff turnover is actually a significant factor too, so opinions may shift. But many of the architecture/data model decisions are just built in to those older languages. The architecture isn't subject to the same drift pressures because they're not choices, and that makes the system less complicated overall, and especially over time.

Of course limitations of the various language implementations, as well as the very human distaste of working within a constrained system is probably a big part of the reason that these legacy languages effectively died.

But I think we lost something valuable, without many of us ever realising.

TristanBall··on Protocol Labs is laying off 21% of staff (89 people)
VC's probably aren't, at least not in the way you or i might, rather they're the recipient of other's investment cash. If interest rates are low, there are fewer opportunities for getting any kind of a return, so more investors will look at riskier options. Institutional investors, mutuals, retirement finds etc all have targeted return rates, even if it's "just" x% above inflation. So while their risk models might still only let them invest a small fraction of their capital in high risk instruments, that's still a small fraction of a very, very big pie. Google tell me the US VC market is 68.9bn, measured by revenue or 233bn globally.

While it's the extreme comparison, Blackrock have 8.5 trillion worth of assets under management.

So it would seem to me that relatively small changes in risk appetite have the potential for huge changes to vc funding.. because it was always a tiny part of the wider market

TristanBall··on TikTok's Enshittification
This is great, thankyou. I didn't realise this had become a "thing".
TristanBall··on Netflix has created a self-fulfilling cancelation loop with its new shows
Yup. This is actually why I just cancelled my netflix completely.

I thought it was pretty telling that in their little "tell us why you're cancelling" they didn't have "because we cancel too many shows mid run".

They didn't even have "just following your lead"!!

TristanBall··on Ask HN: Do we need sunblock if the ozone layer is healed?
Did sunburn exist before we damaged the ozone layer?

Have people been using various substances and mechanisms for sun protection for thousands of years?

TristanBall··on Non-binary DDR5 is finally coming
I can't imagine a commercial environment where this really matters.

Sub-optimal ram install layout makes minimal difference in performance one you get past "enough" for your workload - for a huge percentage of corporate workloads - and for those where it does matter, budgets tend to allow for it.

We all know RAM costs will usually be marginal compared to software costs, whether that's licensing, development, implementation, or all three!

Maybe, in very cost conscious smaller envs this might allow for slightly more options under the "buy the smallest number of the largest size dimms that we can, so we upgrade later without taking anything out" purchasing pattern.

But my experience of such envs is that they're cashflow sensitive, and they're actually ok with you filling a machine with smaller, cheaper dimms then rip and replacing to upgrade, even if the original ram still depreciating, because that cost comes out of a different months budget - especially if it's cheaper up front.

You do need to be upfront that that's the tradeoff decision you're making - but it'll be even less of an issue if you've got a way to reuse the replaced ram, even if it's of minimal benefit ( any use > wasted ).

For home users tho... um, nope, 8-32gb seem to cover 99% of users and probably even 50-80% of HN readers.

Gotta be honest tho, was expecting this to be about gender fluid memory (!?) or perhaps someone finding a way to efficiently encode more than 0/1 for better density.. so it was definitely a let down of an article.

← PreviousPage 2 of 4Next →