HNHacker News
TopNewBestAskShowJobs

scbrg

1,836 karma · joined August 13, 2012

submissionscomments
scbrg··on Some terminal frustrations
Heh. Fair enough :-)

I just don't really see how that one, single, extra three second step is much to get upset about, and I think it's just welcome that it rubs me in the face that I got it wrong. It makes me not gloss over the help text and start double dashing my way into the next to command.

But sure, I see your point. I just wished K&R had had the forethought to establish a proper standard. I don't particularly care what it would have been.

scbrg··on Some terminal frustrations
I find it helpful. If it's a program that generally supports single dash options only, having it respond to --help will falsely make me believe that it's one that expects double dash options.

Letting me know that the proper way to ask for help is `-help` also communicates that GNU style double dash long opts is not the way to go with this particular program.

Then I suppose you could argue that GNU style double dash options should be supported. Meh, I dunno. They were the ones that invented the fifteenth standard (xkcd/927).

scbrg··on Some terminal frustrations
You... can? Perhaps I misunderstand you, but doesn't readline solve this problem?
scbrg··on Trump wins presidency for second time
For someone who doesn't follow US politics that closely (yes, we exist), in what way has he made it clear that he wants to dismantle democratic institutions? Any concrete examples?
scbrg··on Cat without cat on the commandline (2020)
pagers are sometimes more of a burden than a help. If a file is relatively short, the terminal's scrollback may be sufficient to navigate the content. A pager may not cooperate well with the terminal's UI for scrolling, and may even mess up scrollback history. And, depending on configuration, may clear the screen when it's closed against the user's wishes.

Yes, there may be flags you can throw on them to make them behave the way you want, but those flags need to be remembered. `cat` is certainly shorter to type and easier to remember than `less -X`

scbrg··on John Carmack on inlined code (2014)
> What is the benefit of such a yikes? Or do you consider it a yikes language as a whole?

None, it was just a simple joke based on the typo in the post I replied to. I like Python, and have in fact been happily using it as my main language for over 20 years.

scbrg··on John Carmack on inlined code (2014)
Not sure I believe the benefit of this approach outweighs the added difficulty wrt testing, but I certainly agree that Python needs a yikes keyword :-)
scbrg··on Why does man print "gimme gimme gimme" at 00:30? (2017)
In this case, it did. The requirement is clearly specified in the top answer:

if you invoke man after midnight it should print "gimme gimme gimme", because of the Abba song called "Gimme gimme gimme a man after midnight"

You might not agree that that's a good requirement. Others' requirements aren't always aligned with yours :)

scbrg··on Excel spreadsheet caused network equipment's physical failure
Not sure if I'm missing a joke here - if so, whoosh, I guess. But he played as everything. At the time his main was a rogue :)
scbrg··on Excel spreadsheet caused network equipment's physical failure
Hmm. I friend of mine claimed that requesting trade with another player in World of Warcraft crashed his router. When he needed to trade, he always insisted that the other player should initiate the transaction.

I was tempted to discard this as pure imagination, but this was a smart and knowledgeable fellow who worked as a programmer, so I'm assuming he had done some investigation before he came to this conclusion.

I know too little about networking equipment, but I can see how certain byte sequences (timed right?) would have some magic meaning. Given enough traffic you're likely to end up sending just such a sequence eventually. Perhaps certain versions of the WoW client spat out just such a magic sequence for the particular router he happened to use?

scbrg··on Hezbollah pager explosions kill several people in Lebanon
Why are you asking me? I'm not even arguing that the attack was wrong.

I just challenged your - IMO incorrect - suggestion that it's reasonable to assume that no devices would spread to anyone other than the original owner.

If there's such a thing as acceptable collateral damage, the attack may still be reasonable. I'm even leaning towards the opinion that it is.

It's possible to consider the downsides of something without being opposed to it.

scbrg··on Hezbollah pager explosions kill several people in Lebanon
Perhaps. Still, in any pool of 3000 people it's fairly reasonable to assume that one or two (or ~2950) are "fucking stupid". Because people, as a rule, are.

If I'd let my prejudice run loose, I'd even argue that militant religious groups have an above average quota of "fucking stupid" people, so odds are indeed fairly good that some of these devices would make it into the hands of someone other than the original owner.

Some would argue that "being related to someone who is fucking stupid" is not a capital offence.

scbrg··on Hezbollah pager explosions kill several people in Lebanon
Not all organizations work as the US military. Or even as a US company.

I know nothing about Hezbollah, but there's a widespread opinion on HN that any equipment you get from "work" can absolutely only be used by yourself in said work environment. That's really not the case in all cultures, everywhere.

At my previous job, management clearly told us that we could use computers & printers for any personal activity, including paid side jobs, as long as we didn't compete with the company and didn't go completely overboard with the printers (personal judgement).

Not every organization is hostile to its employees/members.

I'm guessing Hezbollah is not comparable to the US military in many respects, and assumptions that hold true for the US military may not hold true for any other military or paramilitary group.

That said, I don't have particularly strong opinions about this attack, and I certainly do not support Hezbollah in any way. But this "it works like this here, therefore it works like this everywhere" mentality is a hindrance to understanding the situation - any situation.

scbrg··on Show HN: Vomitorium – all of your project in 1 text file
Never underestimate the node community's willingness to ignore the existing tech stack and reinvent 50 year old tools. It's peak NIH.
scbrg··on Tell HN: GitHub locked me out for not using 2FA
Fair enough. I hadn't considered the spam problem. No, I haven't really encountered it, but then I don't really use GitHub very much either.
scbrg··on Tell HN: GitHub locked me out for not using 2FA
How is an "email alias" (whatever that is) not a valid email address?
scbrg··on I made a super simple diff tool that's free and has no annoying ads

  $ man diff | grep -A1 'SEE ALSO'
  SEE ALSO
         wdiff(1), cmp(1), diff3(1), sdiff(1), patch(1)

I think there's some kind of affiliate program going on...
scbrg··on Greppability is an underrated code metric
We do tar, for xfz I think you have to look to the Slavic languages :)

Anyway, to answer your question:

  $ grep -Fxf <(ls -1 /bin) /usr/share/dict/swedish 
  ack
  ar
  as
  black
  dialog
  dig
  du
  ebb
  ed
  editor
  finger
  flock
  gem
  glade
  grep
  id
  import
  last
  less
  make
  man
  montage
  pager
  pass
  pc
  plog
  red
  reset
  rev
  sed
  sort
  sorter
  split
  stat
  tar
  test
  transform
  vi
:)

[edit]: Ironically, grep in that list is not the same word as the one OP is talking about. That one is actually based on grepp, with the double p. grep means pitchfork.

scbrg··on Parsing Awk Is Tricky
Well. I don't know. Those two programs don't really do the same thing. There's an awful lot of comparisons in the second one. After making the awk program more similar to the Perl program, and using mawk instead of gawk (which is quite a bit slower) the numbers look a bit different:

  $ seq 100000000 > /tmp/numbers 
  $ time perl -MData::Dumper -ne '$n{length($_)}++; END {print Dumper(%n)}'  /tmp/numbers 
  $VAR1 = '7';
  $VAR2 = 900000;
  $VAR3 = '8';
  $VAR4 = 9000000;
  $VAR5 = '5';
  $VAR6 = 9000;
  $VAR7 = '4';
  $VAR8 = 900;
  $VAR9 = '6';
  $VAR10 = 90000;
  $VAR11 = '10';
  $VAR12 = 1;
  $VAR13 = '2';
  $VAR14 = 9;
  $VAR15 = '3';
  $VAR16 = 90;
  $VAR17 = '9';
  $VAR18 = 90000000;
  
  real 0m16.483s
  user 0m16.071s
  sys 0m0.352s
  $ time mawk '{ lengths[length($0)]++ } END { max = 0; for(l in lengths) if (int(l) > max) max = int(l); print max; }' /tmp/numbers 
  9

  real 0m5.980s
  user 0m5.493s
  sys 0m0.457s
[edit]: Actually had a bug in the initial implementation. Of course.
scbrg··on 17-year-old student exposes Germany's 'secret' pirate site blocklist
For your anecdata is somewhat relevant you need to know around 2,000 people well enough to accurately judge whether they're capable of circumventing a DNS block :-)
scbrg··on Aerc: A well-crafted TUI for email
> But what does it actually stand for? Terminal user interface? Text user interface?

Yes.

https://en.wikipedia.org/wiki/Text-based_user_interface

The Wikipedia page is from 2004, so it's been around a while.

scbrg··on Mpv – A free, open-source, and cross-platform media player
+1. This is a fantastic feature. I haven't even bothered learning the keybindings (perhaps I should), I just start with --sid1= and --sid2= and it works well enough.

Neither me nor my significant other are native English speakers, but we have different native languages. I'm comfortable enough with English, but like having English subtitles since I have a hard time with some dialects and occasionally just miss a word or two due to noisy audio. My SO likes having subtitles in their native language.

Being able to have multiple subtitles makes it possible for both of us to get the experience we like, at the cost of a little screen real estate. Well worth it.

scbrg··on Four billion years in four minutes – Simulating worlds on the GPU
> I’m not sure I’ve ever been faced with different versions of a fiction before.

You probably have, but haven't thought of it like that. Ever seen a Director's Cut version of a movie? :-)

scbrg··on Let's stop counting centuries
Swede here. Both the American an the French revolution were taught when I went to school in the ninth and tenth decades of the twentieth century. As GP points out, they're both fairly significant events that had side effects relevant even to us up here.

I would be extremely surprised if Sweden was unique among European nations in this regard.

scbrg··on PyPy has been working for me for several years now
PyPy was first. It was indeed easier in the era when the Cheese Shop was called the Cheese Shop, and not PyPi.

[edit]: After some searching, I notice that PEP 301 is actually dated Oct 2002, so perhaps I'm wrong. The public/advertised name was Cheese Shop for quite some time after that, but apparently the name PyPi was at least suggested much earlier than I thought.

https://peps.python.org/pep-0301/

scbrg··on Why No IPv6?
Noted, point taken.
scbrg··on Why No IPv6?
It has worked supremely well. Now I'm beginning to suspect you're just pulling my leg.

In either case, it has little to do with IPv6, so I'll leave it there.

scbrg··on Why No IPv6?
Yes. I'm sure it's the occasional exaggerated reporting in tabloid media that is at fault. The billions of dollars that have been funneled into extremely focused lobbying campaigns spreading FUD and disinformation for 50 years have probably only had marginal effect.
scbrg··on Why No IPv6?
You a climate change denier too, by any chance? The rhetoric is the same. Using the word "alarmist" to dismiss valid concerns, conveniently ignoring all the negative consequences that already have occurred and sprouting nonsense like "nothing has happened."

What's happened is that everybody has been forced behind NAT, completely obliterating pretty much the whole point of Internet to begin with, and that addresses that could be essentially free are super expensive. But la la la nothing has happeeeeeeeened!

scbrg··on Why Do Python Lists Multiply Oddly? Exploring the CPython Source Code
Everything falls in place when you accept that in python all names (including list indexes) are just pointers to an object, and objects aren't copied unless you explicitly copy them. Everything else follows from that.

If you had done [1] * 4 you'd ended up with a list of four references to the same object (1) as well. It's just that 1 isn't mutable, so nobody cares.

← PreviousPage 3 of 18Next →