61 karma · joined Jun 16, 2018 (8y ago) · 17 submissions
comment 3y ago · link · parent
- redundancy
- striping
- compression
- encryption
- mountpoints
- volumes
- quotas
- snapshots
- send/recv backups
- disk error detection (ECC protects memory only)
All built in with consistent well-documented tooling. No futzing around with lvm mdadm fsck luks fuse fstab etc.
comment 3y ago · link · parent
> Nihilists recognize that meaning is not inherent, but rather ascribed by the person experiencing the feeling.
That sounds reasonable, so here's an attempt at a synthesis. The universe is huge and mostly empty, but here we have a tiny patch full of life and self-ascribed meaning. Does the universe prefer life? The part that's alive certainly does! So don't let it fall to ashes just to appease the void. I think that's the best answer a mere mortal can give.
comment 3y ago · link · parent
Now that the universe has manifested we conscious agents of its matter, how dare we squander this gift? Just because it didn't come with an instruction manual? We will find our own purpose.
comment 4y ago · link · parent
> 5. No Discrimination Against Persons or Groups
> The license must not discriminate against any person or group of persons.
> 6. No Discrimination Against Fields of Endeavor
> The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.
comment 5y ago · link · parent
Came out a decade ago and we still don't know how to use it safely.
This example doesn't compile because there is no Result on ConfiguredTaskAwaitable. Regardless, ConfigureAwait(false) does absolutely nothing here because this Task is not being awaited.
If you're going to block this thread, you must push the work to another thread or it's going to deadlock when the implementation tries to resume a continuation (unless the implementation is 100% perfect and the SynchronizationContext smiles upon you).
var result = Task.Run(() => CalculateAsync()).GetAwaiter().GetResult();
This avoids the deadlock but can lead to other nasty things like thread pool starvation. The only true solution is to go async all the way - https://blog.stephencleary.com/2012/07/dont-block-on-async-c...
comment 6y ago · link · parent
comment 6y ago · link · parent
namespace ThirdParty {
public sealed class Foo { public void Do() { } }
}
and I want to hide it behind namespace MyCode {
interface IFoo { void Do(); }
}
the compiler does not accept ThirdParty.Foo as an implementation of MyCode.IFoo so I must define a wrapper namespace MyCode {
sealed class ThirdPartyFooAdapter : IFoo {
public ThirdPartyFooAdapter(ThirdParty.Foo instance) {
_instance = instance;
}
readonly ThirdParty.Foo _instance;
public void Do() => _instance.Do();
}
}
which only gets more tedious as the number of methods and implementations grows.comment 8y ago · link · parent
import { query } from 'itiriri';
function* fibonacci() {
let [a, b] = [0, 1];
while (true) {
yield a;
[a, b] = [b, a + b];
}
}
// Finding first 3 Fibonacci numbers that contain 42
const result = query(fibonacci())
.filter(x => x.toString().indexOf('42') !== -1)
.take(3);
for (const e of result) {
console.log(e);
}
// outputs: 514229, 267914296, 7778742049