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.
40 karma · joined November 22, 2015
#!/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)) use Moose;
sub foo {
...
}
around foo => sub {
say "Called with args: @_";
}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.