HNHacker News
TopNewBestAskShowJobs

sysread

40 karma · joined November 22, 2015

submissionscomments
sysread··on "Rules" that terminal programs follow
Non-interactive programs that emit informational output should only do so to stderr or a log file so that they may be used in a pipe line.
sysread··on 1B nested loop iterations
I tried this with elixir, and on my m3 mac, it ran in 6.5s. Perl took over 40s :P

  #!/usr/bin/env elixir
  u =
    case System.argv() do
      [arg] -> String.to_integer(arg)
      _ -> raise "Please provide a valid integer as the first argument."
    end

  r = :rand.uniform(10_000) - 1

  a = :array.new(10_000, default: 0)

  a =
    Enum.reduce(0..9_999, a, fn i, acc ->
      inner_sum =
        Enum.reduce(0..99_999, 0, fn j, sum ->
          sum + rem(j, u)
        end)

      updated_value = :array.get(i, acc) + inner_sum + r
      :array.set(i, updated_value, acc)
    end)

  IO.puts(:array.get(r, a))
sysread··on Show HN: Auto Wiki – Turn your codebase into a Wiki
Why does it request write access to my repos via gh auth?
sysread··on Phind Model beats GPT-4 at coding, with GPT-3.5 speed and 16k context
Looks nice, but it's quite pricy compared to OpenAI's API pricing or ChatGPT.
sysread··on Dynamic types have the potential to be more than "no static types"
Soooooooo... what he's looking for and failing to find is Perl, Type::Tiny, and Moose :P

  use Moose;

  sub foo {
    ...
  }

  around foo => sub {
    say "Called with args: @_";
  }
sysread··on UBI Would Likely Increase Poverty Rather Than Reduce It (2019)
That's a misleading title. It's predicated on the assumption that, "conservative support for UBI rests on an approach that would increase poverty, rather than reduce it."
sysread··on Perl 7 is going to be Perl 5.32, mostly
You should check out janet-lang.org. It's got built in peg parsing.
sysread··on Ask HN: What encrypted Dropbox alternative do you use?
I've used cryptomator in the past but it still feels like it needs a bit more testing and polish before I'd be confident in using it for personal file security.

Boxcryptor has the feel of an incredibly brittle app. I'd hate to be the one who had to maintain that thing.

Tresorit is wonderful if you're rich.

I've settled on pcloud. Adding end to end encryption is an add on service but inexpensive and dependable. They also offer background backups of your social media accounts, downloading and storing all of the photos you've uploaded to fb, Instagram, Google photos, and even doing full Google drive backups.

sysread··on AlphaSmart
Please let there be a Kickstarter. I loved my alphasmart so much.
sysread··on Mozilla’s newest app perfectly captures the ethical dilemma of ad-blocking
The "conflict" described here is a result of unchecked greed in advertising as they worked to grab user focus at all costs. Had they behaved in a more disciplined manner, ad blockers would not be so popular or would work more like Disconnect.me and Mozilla's new product. Instead, they will have to earn the chance to be seen again the hard way.
sysread··on Baffling Web Trackers by Obfuscating Your Movements Online
"It’s increasingly hard to “opt out” of online tracking. “Unless you want to go live in a cave away from society,” Nissenbaum notes, you need to be online—often for work or to access government services. Online services claim they’re voluntary, but the cost of being a refusenik grows every day."