HN user

opk

395 karma
Posts4
Comments178
View on HN

It's just a shell prompt. There really won't be much in the way of bugs. And it's popular. Doing a quick scan of github issues, there's no shortage of questions where some other random plugin or weird terminal emulator has strange interactions. I think the author can be forgiven for not wanting to diagnose such combinations.

If zsh has its completion fully configured by default, there will be no need for most people to turn knobs nor will it be a "half decent shell." It'll be the best shell, if it isn't already.

The curse of backward compatibility means that zsh does not break your setup or change things on you. And there are still developers left who bear the trauma from the one time that was tried back in the early-mid 90s in the 2.x version series. Sadly that means many new features remain inactive by default, especially anything written in shell-code like command-specific completions.

If you've only compared against zsh's out-of-the-box completion then you're comparing against the fully backward compatible with how things were in 1993 state. Turn on compinit, and a half-dozen styles to enable descriptions at the very least. The content of `StartupFiles/zshrc` from zsh sources is more than enough, no need for a bloated framework like oh-my-zsh.

I'd be rather skeptical about the "fix" of updating the completion cache once a day only. Enabling oh-my-zsh already runs `compinit` and it does so after changing the function path in `fpath`. By running it again with a different `fpath` you invalidate the previous cache - meaning it builds a fresh cache twice every time you start zsh. If you use a plugin framework that already runs compinit, simply don't run it again separately. And make sure that `compinit` is only run after the final plugin or whatever has finished changing `fpath`. If you get that right, you'll only ever need to regenerate the cache when something actually updates.

Has anyone actually got this llama stuff to be usable on even moderate hardware? I find it just crashes because it doesn't find enough RAM. I've got 2G of VRAM on an AMD graphics card and 16G of system RAM and that doesn't seem to be enough. The impression I got from reading up was that it worked for most Apple stuff because the memory is unified and other than that, you need very expensive Nvidia GPUs with lots of VRAM. Are there any affordable options?

This article implies that you have to use NAT with Wireguard which really isn't the case at all. Normal subnet routing works fine provided your destination hosts know to use the wireguard server as the gateway for the wireguard subnet. Just configuring a static route on the normal default router is generally enough. Certainly, there are cases where NAT is useful, for example I redirect attempts to use public DNS to my local DNS.

When I was studying in the late 80s / early 90s, the text books contrasted the "old" waterfall approach with the more "modern" iterative approach. That was long before Agile or whatever had been invented and recognised that there needed to be a feedback loop.

Trying to promote agile/scrum/xp/whatever by attacking waterfall is a straw man argument in my view because it is not comparing against what came before. That's not to say that clueless managers don't still like to reinvent and impose what is essentially waterfall.

We use Oracle Linux where I work because we used to use Solaris. At one point it looked suspiciously like Redhat had explicitly removed support for some Oracle hardware from their kernel and the UEK saved us. Besides the kernel they also offer a few other extras and optional newer versions like dtrace, support for some extra filesystems and newer KVM. I get the impression that the fact that they're underdogs in the Linux market helps to keep them honest. Much of their key staff are clearly open source advocates even if Larry only cares about money. And while the Oracle support is not up to the standards of the old Sun support it really isn't a bad choice. And it'd be easy to switch away if we ever need to.

You can do `zfs set copies=2` for a ZFS dataset if you think there's value in the extra copies. That's better than a copy of the file because with a single bad block, the checksum will fail and ZFS will retrieve the data from the good block and repair both files. In practice, using disk mirrors is better than setting the copies property.

My workplace has been using ZFS for years. I've yet to see an alternative come close to being compelling. We use OpenZFS on all our RHEL servers and even workstations with XFS for root partitions and smaller clients. Our primary file server is Solaris 11 but is coming to the end of its long life. The plan is to use FreeBSD on the replacement. ZFS has become so valuable to us that it alone can be a major factor in directing our other choices.

Is nice to see it advancing in useful ways. Hopefully this leads to offline dedup without the runtime memory costs.

Maybe salaries are crazy in Silicon Valley, but in Europe I really don't see this. I got a decent starting salary 25 years ago but having remained in a technical role I've never got more than minimal pay rises. I now earn way less than my contemporaries from University who went into other fields. And if I look around for job vacancies, they're never offering big money, certainly never close to 6 figures. Yet the perception in the wider public seems to be that CS professionals have loads of money even here.

Letters she sent were decoded at the time. The evidence leading to her being executed was largely based on that. It is a simple substitution cipher so vulnerable to letter frequency analysis. So the article title is either misunderstanding or click-bait. They do appear to have found previously lost letters which is very interesting. But deciphering them is easy.

Companies are always finding ways to justify lacks of pay rise. The company I was working for got acquired by a much bigger company with all these complex procedures in place and they intentionally allocated all the acquired employees much lower "career levels" so that they can justify no pay rises by pointing out that we're over-paid for our level. I've got 25-years of experience but am on the same level as new graduate hires. They also know that because I'm a foreigner and do have a family to worry about that I'm not going anywhere in a hurry. The industry is also quite badly ageist. Trying to even get a new job once in your mid-40s can be a challenge.

A neat XOR trick 4 years ago

I assume the author is realigning to get only one bit for each letter. This relies on having an alphabet of 26 characters where 26 is less than the 32 available in a u32. In most real-world problems, you need to allow for the full ASCII or Unicode range and this wouldn't be possible.

Using codepoints directly, there is overlap. 'f' ^ 'd' will give you the same bit pattern as 'b'. You could keep an xor value for each window size smaller than the full window but that effectively brings back the inner loop that using xor is avoiding and you could just use equality. With codepoints, there may be a solution similar to a bloom filter so efficiently determine whether a duplicate is possible but I've not thought through that fully.

I long ago concluded that trying to line stuff up in columns like this in code is a mistake. It often results in realignment of blocks for small changes so what should be a small diff in the git history ends up being big.

Only rarely is the vertical alignment useful because mostly code isn't read vertically. Used in moderation, the reverse Christmas tree style used in the Linux kernel can be as good for readability (sorted longest to shortest). For some constant structures a reordering of fields to put the variable length element at the end of the line removes the need for padding space (like in the output of `ls -l` where filenames come last).

A common indentation style for continuation lines is to align with the start of arguments to the function. I've never seen the sense of this variable amount where indentation after a while is much more than after an if. Double the normal indentation for continuation works well in languages where line continuation isn't otherwise distinct from normal blocks.

Many things are similar. What differences bother a particular user will vary. In many cases, zsh's approach is better so the value of crippling it is questionable. A common example is not splitting variables at spaces which is much better if you might have filenames with spaces in but it helps if you bother to learn to use arrays. Another example is the behaviour when wildcards don't match any files. Bash leaves the word unchanged with the wildcards in place which is less robust and fairly nasty but if you're inclined to be lazy can save on quoting.

So don't try to make zsh mimic bash, use it as-is and whenever something bothers you, try to understand both how the behaviour can be changed and consider the actual merit of the options.

The shell's defaults are conservative because when you change the defaults you change the setup of many existing users. So unconfigured, the shells feel much the same as they did thirty years ago.

There can be other reasons for wanting a smallish history besides fast startup like wanting low history numbers if you learnt all the ancient `!` history escapes that were the main way of using history with csh going back forty-plus years ago. This is also one of the reasons why extension theme frameworks like oh-my-zsh have become popular - much of what they do is enable bells and whistles that are features of the core shell.

Even with Java 1.4 the obvious mapping of class diagrams to data structures made for terrible data structures. You end up with an interconnected maze of objects that is totally inefficient for the algorithms. The mess typically included redundant, bidirectional and cyclic links between objects and where an object's only purpose is to be a list of another type of object, someone ends up writing a more limited wrapper around std::list/Collection/whatever.

Managers were overly fond of the class diagrams because they could understand them. And dividing work between programmers by class rather than by logical feature somehow made sense to them. I recall one manager spending way too much time arranging to print a huge UML diagram across multiple sheets of A4, taping it to the wall and then annotating it constantly by hand.

But knowing it can still be useful for simple sketches. Similarly dynamic dispatch is a really useful tool for particular cases when programming – used alongside other non-OO techniques. Our industry follows fads and fashions to an amazing extent but when things fall out of favour the baby goes out with the bathwater.

Seems like a nice idea but choosing recipients based on popularity is not going to reach the most deserving. Of the nominees, they should cut it down to those who are doing open source as a spare time hobby. Preferably those who have maintained some unfashionable, boring seeming infrastructure project for the past couple of decades. Of the names that are familiar to me on the nominee list, all are the type of people that are adept enough at self-promotion to be well paid anyway.

Pick the number 2 or 3 developer on small team projects rather than the well-known charismatic founder. For a pure one-man project it is a lot easier to solicit donations because there's no need to divide up the spoils. Many projects are small teams, only the biggest create foundations an have the capacity to have actual assets.

I migrated to mblaze after many years with MH and nmh, mostly because the Maildir backend allowed me to serve mail out as IMAP to have access from a mobile. Some things it does much better like threading but I still use parts of nmh where it's better.

Ansible 2.13 4 years ago

If you need to see the output of commands and tasks in ansible, select a different output callback. Where I want something rudimentary, I use `ANSIBLE_STDOUT_CALLBACK=json` and a tool like github.com/okapia/ansible-json-monitor to parse the json.

On raw defaults, I find it hard to see that you can do anything with either bash or zsh where the shell itself does anything where you can even notice a delay. Things like basic file completion or history searching are basically instant. For scripting there are plenty of benchmarks out there and zsh typically beats bash but both are beaten my minimal shells like dash.

Unfortunately, it doesn't get you most features out of zsh. It leaves a lot disabled too. It turns on the included completions, adds flashy prompt themes and a pile of aliases that you still need to learn if you want to get any benefit from them. Key bindings are largely left untouched with none of the advanced widgets.

The basic unit on which shell scripts build is external commands. If what you want to do is to tie a few together, it is by far the best tool. For the type of programming problem where you need data structures it is indeed awful. But things like Python are really quite poor when it comes to executing external commands. You either need a dozen lines for each external command or things are done in a crap way with commands running synchronously when they don't need to be. With many real languages, people use a `system()` function that is running sh every time along with evaluation because the alternative is fork/exec/wait etc.

Many of those sh tricks you link to are better even in the common ksh/bash/zsh subset than in pure POSIX.

I always use the Europass format. For an IT sysadmin job, it's not like I'm trying to prove that I know how to use a basic word processor. Or demonstrate the type of artistic design skills that go into coming up with my own format. I like the fact that by using something standard, I'm less likely to be judged on stuff like choice of font etc. It tends to cover key details in a fairly terse format well which at least leaves scope for more wordy explanations in a cover letter. I find I don't end up needing to tweak the CV much when adapting it for different job applications while any cover letter does tend to then be fully one-off.

That said, my record in actually ever landing a new job is fairly woeful but that may be more down to being poor in interviews.