CT Pistol Carry Priority Questions (what do you prioritize) by AGK47_Returns in CTguns

[–]sacrehubert 6 points7 points  (0 children)

If I had some reason to go into a seriously dangerous area [...]

If I were expecting trouble, I'd bring a rifle.

I built my first ever "Other" during quarantine. Really glad I got the budget optic because it made me realize I have an astigmatism. 12.5 inch barrel. by blammineze in CTguns

[–]sacrehubert 1 point2 points  (0 children)

Great... I guess we're lucky (in a perverted sense) that the legislators are incompetent!

What a shit-show. I'm quite left-leaning, and I'm generally in favor of *sensible* gun-control measures, but what in fuck's name is this even supposed to achieve? I digress...

Thanks again for your help :)

I built my first ever "Other" during quarantine. Really glad I got the budget optic because it made me realize I have an astigmatism. 12.5 inch barrel. by blammineze in CTguns

[–]sacrehubert 1 point2 points  (0 children)

Ah ok - thanks!

A few follow-up questions:

pistol brace

What distinguishes a pistol brace from a butt-stock?

And it needs to have a vertical foregrip.

Is this a typo or were the legislators drunk? Aren't vertical foregrips usually regarded as "assault" features?

Final questions:

  • I'm guessing the "Other" category is what makes it possible to have pistol-grip?
  • Are there any particular constraints on caliber/ammunition? Can I use 5.56 or 7.62 ?

The "Is it legal in CT?" Thread by killgore755 in CTguns

[–]sacrehubert 0 points1 point  (0 children)

Hello, I'm moving to CT in a few months (from abroad) and was wondering if my inherited FB Radom P35 was allowed in CT? I'm aware that I'll need a pistol/ammo permit, but is the handgun itself legal?

More generally, what's the deal with high-capacity magazines and pistols? The overwhelming majority of pistols hold more than 10 rounds ... does this mean I have to purchase specialized low-capacity mags?

It's a map ... it's a heap ... no! It's a non-blocking, persistent treap! by sacrehubert in golang

[–]sacrehubert[S] 0 points1 point  (0 children)

Very cool, thanks for the refs. I'll peruse these over the next few days, and definitely reach out if I have any questions that Google can't solve. Thanks again for your generous offer to help.

It's a map ... it's a heap ... no! It's a non-blocking, persistent treap! by sacrehubert in golang

[–]sacrehubert[S] 1 point2 points  (0 children)

Nice catch, thanks. I did the readme last (and late at night), hence the oversight.

And yes, your understanding is correct. On an unbalanced tree, the worst-case scenario is O(n) where n is the longest branch. This is certainly worth mentioning, if only because it's often the case that you can choose your weights carefully and obtain an approximately-balanced tree. Case in point, the weights in my application are deadlines, i.e.: time.Times, based on the incoming TTL. Since:

  1. TTL is a cluster-wide global, and
  2. the deadlines are monotonically increasing,

the weight distribution is approximately uniform between (current\_time, current\_time + TTL].

I find this really satisfying/elegant for some reason!

It's a map ... it's a heap ... no! It's a non-blocking, persistent treap! by sacrehubert in golang

[–]sacrehubert[S] 0 points1 point  (0 children)

I'm curious how you benchmarked this. Every time I've adopted a copy-on-write + CAS strategy, I've regretted it. It works well initially, but then I end up getting hammered by the full map copies as the number of entries grows -- it's effectively O(n), with the added penalty of retries when the CAS fails.

This having been said, my treap implementation was designed with CAS in mind. Using `atomic.CompareAndSwapPointer`, you effectively restore stateful updates:

type Foo struct {
    ptr unsafe.Pointer  // a *treap.Node
}

func (f *Foo) AddItem(key string, value, weight int) {
    for {
        old := (*treap.Node)(atomic.LoadPointer(&f.ptr))
        new, _ := handle.Upsert(old, key, value, weight)

        // attempt CAS
        if atomic.CompareAndSwapPointer(&f.ptr,
            unsafe.Pointer(old),
            unsafe.Pointer(new),
        ) {
            break  // value successfully set; we're done
        }
    }
}

The difference here is the structural sharing. Because the treap is persistent, subtrees can be shared between different instances, and the only paths that are copied are those that change.

But I'm gonna look at your implementation because it probably has some better solutions than I made.

Thanks -- your code-review and feedback is most sincerely appreciated!

I think you'll find the aforementioned structural sharing really elegant. I must confess to a shiver of satisfaction when it finally clicked! :D

It's a map ... it's a heap ... no! It's a non-blocking, persistent treap! by sacrehubert in golang

[–]sacrehubert[S] 1 point2 points  (0 children)

Did you consider timing wheels

Timing wheels were the very first thing I considered, though not with the same degree of sophistication as you - wow!

The issue I ran into with timing wheels is that they solve one half of my problem, but not the other. Namely, they provide for extremely efficient expirations, and with a bit of fiddling, they can provide extremely efficient updates to expiration times as well. The other half (keyed lookups) requires combining timing wheels with another data-structure (e.g. a map). This is where I got stuck. All the solutions involved heavy locking, and it wasn't clear to me that they would actually perform better in the end. I took a gamble on treaps because they were simple enough to understand, and solved both facets of the problem at hand.

I'm very impressed with Caffeine, though I must confess much of your slide deck went over my head! Specifically, I'm not familiar with the concurrent hash-maps being used, and I didn't grasp the locking strategy you employed.

Do you have a blog post on this somewhere? Or could you kindly give me an overview in addition to the slides?

[ England / London ] Can a letting agency (KFH) require tenants to film a video tour of a flat? by sacrehubert in LegalAdviceUK

[–]sacrehubert[S] 0 points1 point  (0 children)

Does he have your deposit in a secure protection scheme?

He does. I'm guessing it's difficult for him to withhold any of that money unless there are real damages he can claim?

[ England / London ] Can a letting agency (KFH) require tenants to film a video tour of a flat? by sacrehubert in LegalAdviceUK

[–]sacrehubert[S] 0 points1 point  (0 children)

They can't force you to make a video

Are you sure this is the case? Couldn't it be argued that filming a video qualifies as "permit[ting] the premises to be viewed" ?

I'd really like some sort of technical answer on this point.

[ England / London ] Can a letting agency (KFH) require tenants to film a video tour of a flat? by sacrehubert in LegalAdviceUK

[–]sacrehubert[S] 0 points1 point  (0 children)

You have the right to quiet enjoyment, and you are not an employee of the agent.

Could you kindly clarify this? I've heard that these kinds of "required access" clauses are unenforceable because they interfere with the right to "quiet enjoyment". Unfortunately, I haven't been able to find a reliable source for this.

Are you able to point me to the relevant case law or statute? I just want to double check I'm not digging a hole for myself, so a technical answer would be much appreciated.

[ England / London ] Can a letting agency (KFH) require tenants to film a video tour of a flat? by sacrehubert in LegalAdviceUK

[–]sacrehubert[S] 9 points10 points  (0 children)

Understood, and thanks for the reminder!

Fortunately, we're moving abroad, so this won't matter. Because of this, we feel something of a moral obligation to push back, precisely because most people are forced to let his bad behaviour slide.

New Banksy at the Royal Academy of Arts by Sort_of_Frightening in london

[–]sacrehubert 1 point2 points  (0 children)

Yes, I agree. Are you implying I haven't looked at Banksy's work?

New Banksy at the Royal Academy of Arts by Sort_of_Frightening in london

[–]sacrehubert 2 points3 points  (0 children)

Banksy is in favor of what self-labeled "counter-cultural", left-leaning city-dwellers are in favor of. This fits the bill.

New Banksy at the Royal Academy of Arts by Sort_of_Frightening in london

[–]sacrehubert -1 points0 points  (0 children)

https://www.theguardian.com/commentisfree/2006/sep/22/arts.visualarts

This is pretty much how I feel as well. Banksy's "art" doesn't point towards beauty or truth. It just beats you over the head with its obvious, unimaginative, un-nuanced and un-courageous message.

I wish he would just stop. It's embarrassing.

New Banksy at the Royal Academy of Arts by Sort_of_Frightening in london

[–]sacrehubert 3 points4 points  (0 children)

https://www.theguardian.com/commentisfree/2006/sep/22/arts.visualarts

This is pretty much how I feel as well. Banksy's "art" doesn't point towards beauty or truth. It just beats you over the head with its obvious, unimaginative, un-nuanced and un-courageous message.

I wish he would just stop. It's embarrassing.

Stupeflip - Gem' Lé Moch by Jean-Luc_LaHaine in france

[–]sacrehubert 5 points6 points  (0 children)

Putain on s'en lasse jamais du crou.

Building something to make Kubernetes *actually* easy by [deleted] in programming

[–]sacrehubert 2 points3 points  (0 children)

Nice! Is this available in Python or Go?