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.

long, rambling, computertouching despair, and all i wanted to do was learn category theory, why does this keep happening to me

so i wanted to learn some category theory.

opened up a textbook on one side, agda on the other, and started trying to formalize the concepts and proofs

but i hit a bug in how agda’s pretty printer behaves. one i couldn’t easily work around

so i decided i’ll finally start contributing to agda and try to fix it myself

started poking around, accidentally figured out a different bug that I previously thought wasn’t worth looking into

but okay, gonna keep digging into the bug that actually led me down this path.

soon i found myself wanting to take a look at how agda’s AST looks in practice in one specific case, only to find that there isn’t really a way to do that, because haskell’s Show prints way too much information, all in one line, filling the entire terminal screen with mostly irrelevant info

so i did the natural thing and started writing a pretty printer for this purpose

eventually i got annoyed that each time i compiled agda, it would spend a good 30 seconds doing some kind of build system bookkeeping

like, i measured. a build with the entire cache fresh already would take 30 fucking seconds

as 30 seconds is enough time for me to start scrolling through fedi, i decided i need to look into this

so i started poking around the surprisingly complex makefile, learning more than i ever wanted to know about make

finally found the culprit: in a maze of includes, recursive make invocations and variable expansion, various variations of stack –dest-dir would get called like. way too many times during the build. and each of those would take 750ms to initialize, print the path to the build directory and exit

sigh, okay. i guess i’ll need to optimize the makefile a bit

managed to get it down to 10s for a do-nothing build. scoured the internet looking for a feature of make that would be useful to bring it down further

didn’t find it. as far as i can tell, “expand lazily, but then cache it” is not a behavior that’s available in gnu make, despite the absolute abundance of features they added on top of what posix specifies

now, thankfully i know better than to attempt upstreaming a feature into gnu make. and anyway, in this case the good folks at stack overflow gave me a hint on what absolute crimes i could commit in that makefile to make it go faster

but while i was contemplating my plan, i wondered: why does stack take 750ms to print a path in the first place?

after execsnoop and strace didn’t give me any hints, i decided to try using the linux profiler “perf”, which i’m sure you know is a master class in UX design

(it is not)

so i open the “perf report” and see a bunch of addresses for which i don’t have debuginfo. suspiciously small addresses too, like 0x5ddc

i start to notice the feeling of despair creeping up on me, but decide to persevere for at least a little bit more

i choose the hottest sample on the report and select “Annotate 00…005ddc”

now, i want you to consider that what i saw next was enough to get me to write out this entire rant. take a moment to internalize that.

what batshit insane assembly did i see? what could possibly have been this upsetting?

“Press ‘h’ for help on key bindings”, it said. followed immediately by “erf: Segmentation fault”, that’s right, erf, without the p.

then came a backtrace. one that listed the function name for each stack frame, as well as the source code file in which it were defined.

but the line number of all these entries is fucking 0 for some reason, as if to mock me

like, it’s not like i cared at this point where exactly the segfault happened, because even i do have my limits

but the computer apparently decided to find one more place in which it could subtly signal that there’s a nugget of insanity lurking within, to really get that eye twitchin’

and all i wanted was to learn some category theory

0
1

Do you have 5.25" and 8" floppy disks that are spare, low-quality, degrading, or just generally in bad shape?

I'd like to take my floppy disk data recovery game to the next level. I have equipment, but there's no substitute for experience. Therefore I'm looking for loose collections of old floppy disks to practice on. I'm especially interested in working with disks where the binder affixing the media to the donut is starting to fail.

I'm in London; will pay shipping; can pick up disks around here as well. Boosts are appreciated!

An 8" hard-sectored single-density disk, a 5.25" double-density disk, and an Apple FileWare (Twiggy) disk scattered on a gray surface.
0
16
0
0
0
0
1
0
1
1
1
0
0
17
0
0
0
0

설 연휴 기간 한국과 동남아시아 누리꾼들이 서로에 대한 혐오·비하 발언을 주고받는 날 선 설전을 벌였습니다. 표면적으로는 양쪽의 K팝 팬덤의 갈등이 발단이 됐지만, 한국 사회의 ‘동남아시아 멸시’에 대한 누적된 분노가 표출된 모양새입니다. 한국 사회의 인종주의적 태도가 ‘다양성’을 동력으로 삼는 한류 열기에 악영향을 미칠 것이라는 우려도 나옵니다.

한국-동남아 K팝 팬들…SNS서 ‘혐오 설전’ 왜?

0
0
0
0
0
0
0

Yesterday in Oaxaca, a federal court ruled partially in favor of Mazatec anarchist Miguel Peralta, who is facing a 50-year sentence for trumped-up charges of murder for his role in the defense of the autonomy of his community of Eloxochitlán de Flores Magón.

The court ruled that the evidence and accusations made against Miguel, who has been battling these charges in and outside of prison for more than ten years and is now in hiding, were false. That is an important step.

But in cowardly fashion, rather than ordering an end to this charade and ruling in favor of Miguel's freedom, they deferred the matter to a lower state court to rule on the same material and issue a final verdict. Thus, Miguel remains in limbo with his freedom dependent on the more corrupt state court of Oaxaca.

Over the phone, Miguel said after the ruling, "Once again, it has been confirmed that justice, for our peoples and even more so for the community of Eloxochitlán, is given to us in crumbs. We have no other choice but to continue our resistance, to continue fighting for freedom, until we take it from them."

desinformemonos.org/sentencia-

0
1

Yesterday in Oaxaca, a federal court ruled partially in favor of Mazatec anarchist Miguel Peralta, who is facing a 50-year sentence for trumped-up charges of murder for his role in the defense of the autonomy of his community of Eloxochitlán de Flores Magón.

The court ruled that the evidence and accusations made against Miguel, who has been battling these charges in and outside of prison for more than ten years and is now in hiding, were false. That is an important step.

But in cowardly fashion, rather than ordering an end to this charade and ruling in favor of Miguel's freedom, they deferred the matter to a lower state court to rule on the same material and issue a final verdict. Thus, Miguel remains in limbo with his freedom dependent on the more corrupt state court of Oaxaca.

Over the phone, Miguel said after the ruling, "Once again, it has been confirmed that justice, for our peoples and even more so for the community of Eloxochitlán, is given to us in crumbs. We have no other choice but to continue our resistance, to continue fighting for freedom, until we take it from them."

desinformemonos.org/sentencia-

0
0
2
0
0
0

In the old blogging software I created back in the 1990s, I had a handful of posts types

There was a type of rich-text oriented post that had a title. (Article)

And, there way another type of rich-text oriented post that did not have a title. (Note)

(There were also other types of posts, but they aren't relevant here)

These 2 types of posts were rendered / displayed differently

I.e., my 1990s software already had this distinction

@reiver@reiver ⊼ (Charles) :batman: there's a page on this in the primer:

w3.org/wiki/Activity_Streams/P

But it's not always clear.

One thing that might distinguish is presentation.

I expect an Article to appear on its own page. References to an Article in a stream or tree layout might just include title and summary, with a link to a UI to show the full text.

But lots of Note objects can fit in a stream or tree presentation.

0
1
3
0
0

SHOE LIFE (@Shoelife2012) on X
New YorkのManhattan に来ている。
私は寝てばかりだが、街に出かける。とても寒いが、人は多い。人種も多彩だ。
やはり東京に居るのとパワーが違う。私は商売が好きである。商売をするのなら、アメリカでする事は魅力的だ。ダイナミックを感じる。
HokaやONも大盛況である。街を歩くと感じること多々 x.com/i/status/202529800180426

0
1
0

There's a Golden Girls episode where Sophia has a bulk shopping discount card and buys all sorts of nonsense including four gross of toothbrushes and I think of it every time someone says they generated however many hundreds of thousands of lines of code

Aside from those who are posting this shit to undermine labour, I get that it might feel empowering to generate code, because we've gatekept and mystified the fuck out of it.. but for me as someone who's spent many years now teaching folk coding skills, what I want people to understand more than anything is *it's just code*

It's not magical or special, it's just a means to an end, it can be taught, and learned

0

I'm still not sure if Yew or Dioxus is a better library, but a thing I will say in favor of Yew: Pretty much every time I've gone "hm, but I need to do [X], and the model doesn't support [X]" I realize Yew anticipated this and has a component [Y] that does [X]

0
0
0
0

Hello! I’m an artist new to the whole fediverse thing. I’m really inspired by hope and the echoes of our interactions with the universe around us.

I decided to return to studying the basics in drawing because I would like to give my imagination the dignity of expressing itself.

Eventually, I hope that my art will become more instinctive and better convey cyberpunk/sci-fi/fantasy storytelling, but inspiration is everywhere; I wanna see your work too!

A drawing of a blue heron perched on a branch with outspread wings spans two sketchbook pages
0
5
0

I've seen an ongoing debate between "Note" versus "Article" in ActivityPub / ActivityStreams.

When is something a "Note"‽
When is something an "Article"‽

Personally — I would probably have made the distinction this way.

An "Article" has a title.
A "Note" doesn't have a title.

(In ActivityPub / ActivityStreams, a 'title' seems to tend to get represented in the "name" field.)

0
0
0
0
0
0

Facebookを眺めてて帯状疱疹を発症しちゃった知人をみかけてワクチンを打っておこうかなあと思ったんだけどcdc.gov以下の情報を信じていいものやらわからなくなっちゃったの…

0