Hacker Newsnew | past | comments | ask | show | jobs | submit | sysread's commentslogin

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.


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


Oh, the programs are supposed to take an integer from the command line? Then I wonder how many of them would fail when given an integer that's just a wee bit too large (like, say (2^129)-1).


I don't think that's a concern. My assumption is that the point of taking user input is to prevent a compile from precomputing the result.


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


Great question. We originally had some functionality that can do pull requests for our app, what makes sense instead is to:

1. move private wikis to wiki.mutable.ai (not app.mutable.ai) 2. restrict permissions for wiki github app to read only

Hope that explains things, we just wanted to launch as early as possible to get all the wonderful feedback from the HN community so we can bake it into Auto Wiki v2.


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


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


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


"America has such massive problems that most programs doomed to fail"


This seems inevitable for a global political movement with a mission of discrediting government by kneecapping all its efforts.


The state of California providing the living counterpoint that the other current alternative isn’t effective in solving the issues plaguing society.


>The state of California providing the living counterpoint that the other current alternative isn’t effective in solving the issues plaguing society.

Maybe it's just been a long day, but I don't get your point here.

IIUC (I don't live in California, but I do live in the US), California has a thriving (5th largest in the world, IIRC, if they were separate from the US) economy based on capitalism and free (as in at least paying lip service to fairness) markets.

And therein lies my confusion. Are you saying that "This seems inevitable for a global political movement with a mission of discrediting government by kneecapping all its efforts."[0] California is not trying to discredit government and failing to do so?

Also, are there really only two options? Those being government control of everything or anarcho-capitalism[1]? Not setting up a straw man here (or at least not trying to do so), I just don't understand what you're trying to say, and it's an interesting topic I wouldn't mind discussing.

I hope you see why I'm confused by your statement. If you'd elucidate, I'd really appreciate it. Thanks!

[0] https://news.ycombinator.com/item?id=33157027 (the comment to which you replied)

[1] https://en.wikipedia.org/wiki/Anarcho-capitalism

Edit: Fixed grammatical error.


Nobody talks about California more than Texans.


Some might say that a white paper with a title about how UBI would increase poverty where the key assumption is "if it's sabotaged" is also part of a mission of discrediting government by kneecapping its efforts.


I agree. He's setting up a classic straw man. "The only way we can afford UBI is by letting the conservatives gut other necessary social programs."

That's not a flaw in UBI, that's just an assumption that the politics would work out poorly. UBI may be impossible in the current political climate, but that doesn't mean it's a bad idea, or that it could never work.


Every time UBI comes up on any discussion in libertarian-conservative circles I participate in, UBI always gets grudging hypothetical support conditional on replacing all other social spending with UBI.

A lot of people see UBI as a small-government low-overhead libertarianish solution to current social programs, and the universality of it is seen as making it less unfair/redistributive.

Anecdata is not data, but I don’t think this is a straw man; you just need to talk to some conservatives.

On the other hand, it’s not fiscally manageable. It costs as much as we currently pay in taxes, and we still have to pay for defense and pork on top of it. So implementing UBI would exceed our income.

This would require dramatically higher taxes which are politically unpalatable (such taxes would last no more than two years before any representatives who voted for it got voted out). The amount of money is not life changing for anyone other than the poorest. And it would cost way more than estimated due to fraud (see Medicare for an example). Plus why wouldn’t businesses grab a share of it by jacking up prices on things that poor people can now afford? From the mindset that brings you slum lords.

The market for US sovereign debt is drying up so we’re not going to be able to overspend in the profligate way we have over the last few years.

For these reasons UBI is a pipe dream.


I agree with almost everything you say. The area I break with you is that I don't think that fraud would be a major concern that couldn't be addressed with reasonable checks (and a decade or more of jail for intentional fraudsters).


ignoring the political acceptance of it, UBI would end up tax neutral for many. You also have to change the way you tax and create a wealth tax. ie, if you imagine the wealth distribution in a country, and overlay income tax, you will see it doesn't match wealth distribution, so you need tax models that tax wealth and match your tax take to the wealth distribution (not that you can do this perfectly, but just need something that tracks better). This would make the majority of people better off, politically that's a good thing. Businesses follow market forces, more people with more money should create opportunities for more competition. Where it can be problematic is where there is a limited resource, like housing, it could push rents up, however, it may also give people more opportunity to move out of cities, so hard to know how that would play out.


It seems almost tautological to say that conservatives wouldn't approach it properly, and that any conservative approach would further poverty. Conservativism is interested in keeping the status quo. In general funding UBI in a progressive way and specifically reducing poverty are not compatible with the status quo.


The conservative approach seems to have reduced poverty worldwide


citation_needed


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


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.


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


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.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: