Better HN
topnewbestaskshowjobs
Log inSign up

sysread

40 karma · joined Nov 22, 2015 (11y ago) · 12 submissions

Submissions

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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))

comment 2y ago · link · parent

Why does it request write access to my repos via gh auth?

comment 3y ago · link · parent

Looks nice, but it's quite pricy compared to OpenAI's API pricing or ChatGPT.

comment 3y ago · link · parent

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: @_";
  }

comment 4y ago · link · parent

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."

comment 6y ago · link · parent

You should check out janet-lang.org. It's got built in peg parsing.

comment 8y ago · link · parent

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.

comment 8y ago · link · parent

Please let there be a Kickstarter. I loved my alphasmart so much.

comment 10y ago · link · parent

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.

comment 11y ago · link · parent

"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."