What is Hackers' Pub?

Hackers' Pub is a place for software engineers to share their knowledge and experience with each other. It's also an ActivityPub-enabled social network, so you can follow your favorite hackers in the fediverse and get their latest posts in your feed.

1
1
1
0
0
0
0
0
0

Objective-C's fast enumeration protocol is one of the most underrated parts of the language and something I wish other systems would learn from.

It's designed to build fast loops that iterate over a collection and is agnostic to the kind of collection, without needing a lot of run-time specialisation of the loop.

When you write for (object in collection), it is expanded to a nested loop. The outer loop is responsible for filling a buffer, the inner loop for iterating over the buffer.

The outer loop does some dynamic dispatch and then returns a size, so the dynamic dispatch cost is amortised over the number of elements returned. The structure that's passed to the method contains a buffer and a size of that buffer, a pointer, and some space for storing other iteration state, as well as a pointer that can be checked to ensure that concurrent mutation has not occurred.

If a collection stores data in a single contiguous block (for example, something like std::vector) of the correct type, the outer loop runs once, fetches that pointer, and then the inner loop scans through it. If the collection stores data in a set of buckets, it can return each bucket as a run. If it stores each element separately, then it can do a single dynamically dispatched call and look up the number of elements that the caller requests, which can then be processed quickly by the inner loop.

Pretty much every C++ forward iterator that I've implemented has ended up being some specialised variant of this. ICU's UText has a similar pattern, and I've seen something equivalent implemented in an ad-hoc way in a lot of different places. Being able to write code that iterates over a collection of T, that can dynamically dispatch to any collection even if it's compile-time specialised on the type of T is incredibly useful for avoiding tight coupling across ABI boundaries.

0
0
0
0
1
0
0

다른 혐오표현에 대해 명시하고, 성적 지향과 성 정체성에 대한 혐오표현만 제외된 정통법 개정이 이루어지면 어떻게 될까요? 혐오세력이 온라인에서 그걸로만 욕할겁니다. 그건 법이 허락한 혐오 표현으로 이해할거거든요. 실제 재판으로 가더라도 법조항에 명시가 안되었다는 것으로 혐오표현이 아닌 개인 의사표현의 자유라 주장 할겁니다. 그들이 그 자유를 어디에서 쓸까요? 거리, 학교, 교회, 공공장소, 광장. 모든곳에서 쓰겠죠.

0
0

"인권은 합의의 대상이 아니다. 여론을 핑계로 혐오와 차별을 정당화하는 국가에 맞서 성소수자 운동은 오랫동안 이렇게 외쳐왔다. 여론을 핑계로 기본권 보장 책무를 외면하고, 여론을 빌미로 기본권을 억압하는 모습은 이제 그만 보자. 정부가 지금 해야 할 일은 헌법 제10조에 따라 국민의 불가침 기본권을 확인하고 이를 보장하는 것이다." www.khan.co.kr/article/2023...

[지금, 여기] 인권은 합의의 대상이 아니다

0
0

사회적 합의를 핑계로 대지만, 그냥 민주당이 하기 싫어하는 거라고밖에 생각할 수 없게 된 지도 여러 해다. 몇몇 의원들은 의지가 있는 듯하지만 그 안에서 소수다.

RE: https://bsky.app/profile/did:plc:ibtkxxjrzkzfnm6qzgvjmo3x/post/3lqtndyrwt22x

0

✨ Ready to make Nix at work feel magical? Its your last chance to RSVP and catch Luc’s live demo of Determinate Nix, turning builds into 🚀 speed runs, keeping secrets 🔒 secure, and putting smiles on user faces 😀.

📅 5 June at 9 am PDT | 12 pm EDT | 5 pm BST.
Register here 👉 lu.ma/ppcgnfdy

0
0
0
0
0
0
0
0

기사 읽어보니까 또 교회야? 했는데 마 7:15가 뭔가 봤더니

거짓 선지자들을 삼가라 양의 옷을 입고 너희에게 나아오나 속에는 노략질하는 이리라
아니 그니까 이게 차금법이랑 무슨 관계가 있는데...

0
1
0
0

지금까지 민주당 내 몇몇 의원들이 차금법이나 그 비슷한 내용의 법안들을 몇 차례 발의했지만, 항상 같은 패턴으로 끝난다.

RE: https://bsky.app/profile/did:plc:uabkr6tn7ru4b4e5e6udleuf/post/3lqtj7o2lk22w

0

사회적 합의를 핑계로 대지만, 그냥 민주당이 하기 싫어하는 거라고밖에 생각할 수 없게 된 지도 여러 해다. 몇몇 의원들은 의지가 있는 듯하지만 그 안에서 소수다.

RE: https://bsky.app/profile/did:plc:ibtkxxjrzkzfnm6qzgvjmo3x/post/3lqtndyrwt22x

0

Exciting news for the project! We're thrilled to announce that Emelia Smith (@thisismissemEmelia 👸🏻) has joined as a co-maintainer alongside Hong Minhee (@hongminhee洪 民憙 (Hong Minhee) :nonbinary:).

Emelia brings extensive experience in the ecosystem, having been a long-time contributor to Mastodon and a leading expert in trust & safety tooling for decentralized social networks. She's dedicated years to improving moderation systems and security across platforms.

Her recent contributions to Hollo have been substantial—implementing the reporting/flagging system and making significant improvements to OAuth and security features. These valuable contributions naturally led to her joining as a co-maintainer.

This collaboration marks an important milestone for Hollo as we continue building better single-user microblogging software for the fediverse. Welcome aboard, Emelia! 🚀

8
3
0
0

사회적 합의를 핑계로 대지만, 그냥 민주당이 하기 싫어하는 거라고밖에 생각할 수 없게 된 지도 여러 해다. 몇몇 의원들은 의지가 있는 듯하지만 그 안에서 소수다.

RE: https://bsky.app/profile/did:plc:ibtkxxjrzkzfnm6qzgvjmo3x/post/3lqtndyrwt22x

0
1
1
0
1
0
0
0
0
0
0
1
0
0
0