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.

0
5
0
0
0

Marius replied to the below article:

Marius @Marius@marius.federated.id

After a couple of days percolating the idea, I made a couple of improvements to the tooling around #GoActivityPub services towards the goal of having a cool SSH based admin interface for them.

The first one was to add support for running the SSH server in parallel to the HTTP one, and respond to the same logic for starting and shutting down. This led to a refactoring the HTTP server initialization that was part of the signal wrapper module into its own separate module.

Before moving to an actual REPL interface I have added a basic middleware for Wish to handle commands passed through the ssh connection. The difficult part was to actually interface the existing types I was using for CLI commands, on top of Kong with the ssh middleware, which by itself was trivially simple. This led to quite a heavy refactoring of the packages, forced by Go’s prohibition of dependency cycles.

In the end it’s possible to pass a command to the ssh connection and it gets executed just as if it was run through the control binary on the host machine.

Another largish change this required was into passing io.Writer (and soon io.Reader) instances that corresponded to the output and error outputs (and soon input like I said). This was needed because by default commands executed by Kong use the default standard os.Stdout and os.Stderr and the commands themselves output text. This needs to get refactored into something better but for now it’s workable. So now we can pass the PTY from the ssh session to the commands and output gets sent to the correct place.

One downside to all of this, besides the forced package refactoring, is that the dependencies for the FedBOX service, which is the main place where I’m testing all of this, have increased somewhat with the inclusion of the Charm and Wish related modules. At least I added all this functionality behind a build tag.

To give an idea about what this allows me to do is that now I can operate the production, erm, testing, FedBOX server directly from my machine without needing to ssh to the box that hosts it just by configuring my local ssh client to use the host machine as a jump server:

Host admin.fedbox
    # Currently we use the full IRI for the Service actor
    # of FedBOX as a user
    User https://fedbox.example.com
    # The private key extracted from the Service actor
    IdentityFile ~/.ssh/admin.fedbox.example.com
    # The host server
    ProxyJump example.com:22
    # The local address on the host for FedBOX SSH
    Hostname 127.0.0.1
    # The local port on the host for FedBOX SSH
    Port 40022

To run a command now I just need to do the following:

$ ssh admin.fedbox oauth client list
0 beefaa5a-d00d-4767-94d9-f00ba4d6396d - http://127.0.0.1
1 18e8beef-1d2e-449d-a4d6-5f507f00bac1 - https://client.example.com/callback
Read more →
0

I think I can leave the SSH related part of the code be for a while, as I have managed to get the last piece required to have a robust method for issuing commands to a FedBOX server after installation.

This was the capability of accepting masked input for passwords or other small secret strings.

It took me a while to find the solution, but it was as simple as invoking the ssh client with a forced TTY allocation: ssh -t .... Generally ssh, and my own code in FedBOX, was assuming that if a command is passed the session does not need to be interactive, so reading input was not working properly.

The next step is to actually think about the API for the commands with the final goal being to improve the setup of mocked instances for integration tests.

A back of the napkin list would be:

  • Bootstrapping for a specific host - here we were missing bootstraping a specific host, not just the configured base URL.
  • Setting passwords for actors.
  • Adding OAuth2 client (or rely on dynamic client creation).
  • Adding actors.
  • Adding objects.
  • Running activities processing - this might actually be the best way for setting up a mock instance, because it allows us full control over the Activity, and it uses the correct code paths for object/activity creation.
0
1
1
1
0
0

독재자 트럼프가 받고 싶어하던 노벨평화상 타서 미운털 박힌, 그래서 베네주엘라 침략전쟁 후 미국이 옹립하는 새 정권수반으로 오르지 못한 우익 야당총재 마차도. 트럼프를 우쭈쭈해주고자, 노벨 평화상 나눠가지자 제안하고 트럼프는 그걸 좋아라 함. 그 한심한 꼴을 보다가 노벨위원회가 공식 입장을 내놓음. 약간 건조하게 서술한, "그만 해 이 미친 놈들아." www.nobelpeaceprize.org/press/press-...

A Nobel Prize cannot be revoke...

0
0

관심을 많이 받은 겸 써보고 싶은 분들이 있으신가 싶어서 공유 갤럭시 쓰시는 분들만 사용 가능하고 굿락에서 키즈카페 다운 받으시고 키보드 → 만들기 → 우상단의 ↑ 화살표 아이콘 누르시고 다운 받은 파일 불러오시면 됩니다 drive.google.com/file/d/19lRj...

keys_cafe_최소키_20260110-2146129...

0

Apparently Samsung is putting ‘AI’ (and ads) in fridges. I am certainly not opposed to innovation and think that a lot of technologies that haven’t changed much for a long time have room for improvement (if you grew up in the US or Europe, try using a Japanese toilet and you’ll understand). But the frustrating thing is that there are a lot of useful things that a fridge could do with some computing power and a bit of electrical control that they don’t and which don’t need ‘AI’. Some examples:

  • It could talk to a smart meter to run the compressor when electricity is cheap and keep a reservoir of chilled coolant for when electricity is expensive.
  • It could automatically close the door if I leave it open for more than a minute and don’t first put it into ‘I am cleaning the fridge now’ mode.
  • It could record (with bar code or image recognition - the latter of which you could even market as ‘AI’ because apparently computer vision is ‘AI’ now) when I open things like milk or juice so when a thing says ‘consume writhing 5 days of opening’ and I can’t remember when I opened it, it can tell me.
  • It could then warn me if I’ve left something that will spoil in the fridge.
  • It could track when I remove / replace things so ‘are we nearly out of X’ is a question I can answer from my phone / tablet / laptop when organising a food order, without having to go and check.

All of these are features I would actually find useful. The last ones require a bit of clever computer vision and good UI design, the earlier ones are just applications of mature technology.

And I would actually pay more for these features (and the first one would likely save me more money over the lifetime of the fridge than the price delta, so everyone wins [except oil companies, but that is a feature in itself]).

I could write a similar rant about pretty much every piece of electrical equipment I own. All of these have a load of trivial improvements that could be made if you start by asking the question ‘how do people use this and how do we improve it?’ Rather than ‘how do we add {an app,AI,this week’s buzzword} that marketing wants in the next generation?’

0
0
0
1
0
0
0
0
1

Coal does not save you in heat. Coal melts, trips, and breaks. It’s Victorian technology held together with rust, duct tape, and vibes. Solar just sits there going, “Is that all you’ve got?”

And the funniest part is these same geniuses screaming “renewables don’t work” are sitting in air-conditioned houses powered by the very system they claim is impossible. Absolute gold medal mental gymnastics.

0
1
0
1
1
0
1
1
1
1
0

The December edition of Trunk & Tidbits is posted.

It was a quieter month in terms of commits due to the holiday period, but some solid progress was made. Plus, the latest stable releases, end-of-life for Mastodon 4.2, and news about

blog.joinmastodon.org/2026/01/

0
0
0

“When I was about 20 years old, I met an old pastor’s wife who told me that when she was young and had her first child, she didn’t believe in striking children, although spanking kids with a switch pulled from a tree was standard punishment at the time. But one day, when her son was four or five, he did something that she felt warranted a spanking–the first in his life. She told him that he would have to go outside himself and find a switch for her to hit him with.

0
0
0

両親の反対を押し切って研究者になったけど個人事業主になった若手、ベンチャーに転籍した若手、大学を移らざるをえなくなった研究者たちを見てきて、現場からあがる悲鳴を5年間、聞いてきたのに自分はまともに原稿にしませんでした。素人が評価する内閣府プロジェクトではよくあることと研究者に諭したり自分に言い聞かせたりしてきました。記事をきっかけに産学連携につながると、いい仕事をすれば誰かが評価してくれると慰めてきました。無責任に応援するだけで何の力にもなれなかった。自分は間違っていたのだと思います。
ひえっ...
産学連携はよく言われてるし、実際に技術者がアカデミアに来たり、博士号を持って企業に行く人も結構見る気がする。しかし、政治とアカデミアの連携はどうだろうか?


RE: https://mstdn.poyo.me/users/kivantium/statuses/115870640425313097

0
1
1
1
0

The ethical case against using LLMs for work is straightforward and unambiguous

The productivity case against using LLMs for work is complex and requires an understanding of volatility, variability, biases, security issues, lock-in, and more

But it turns out that if you don’t have any time for ethics, you also don’t have any time for understanding complex systems, so neither case matters to them

0
0
0

블배온 후기



n년만의 장르행사(그것도 코스스텝이 있는)여서 엄청나게 두근두근했고, 그만큼 잘 즐기고 왔습니다.
리디에 들어온 거로 입덕했으니... 입덕하자마자 초고속부스내기. 뭐 이런 거였는데... 하길 잘 했다는 생각이 19273948488번 듭니다.

이래저래 이정도면 장내 관리도 잘 되었고(예전 행사에서 피드백 반영된 결과라고 옆 부스분께 들었음)... 아니 그냥 저는 계속 너무 좋았습니다... 행사장의 분위기, 그 열기... 이거로 1년 먹고 살 수 있어.

일정상 이벤트까진 못 보고 간 게 아쉽기는 하네요.

스태프 분들께서도 진짜... 아 진짜 너무 고생하시는 게 많이 보여서 뭔가 묻기 죄송스러웠지만ㅋㅋㅋ큐ㅠㅠㅜ 진짜 진짜 너무 고생 많으셨고 덕택에 정말로 즐거운 시간 보냈습니다.

사실 아는 사람이 진짜 하나도 없어서 조용히 있다오지 싶었는데 먹을 것을 챙겨주시고 말 걸어주신 분들이 계셔서 감사했어요.
그리고 갑작스런 뉴비 글을 집어가주신 여러분께도 정말 매우... 감사합니다. 부디 글이 입맛에 맞기를... 재미있게 읽으셨기를 바랍니다.

배포본은 오늘 밤쯤 업로드 예정이고, 회지 추가출력 및 통판 건으로 조만간 다시 찾아뵙겠습니다.

0
1
1
1

“Erdos problem #728 was solved more or less autonomously by AI”

Link: mathstodon.xyz/@tao/1158558402
Discussion: news.ycombinator.com/item?id=4

0
0
0
1
0

타이피라는 사이트를 처음 들어봐서 두근거리며 검색해봤더니 옛날 펜슬에서 글리프로 이름을 바꾸었던 그 회사네요…
대표님 아직 포기를 안하셨네요…
:ablobcat_fukifuki:

0
1

アークナイツフェスDAY1おつかれさまでした!今日のお土産などの一部。
待機列が屋外だったのが想定外だったけど、午前中は風も穏やかでそんなに寒くなかったかな。明日はちょっとどうだろう……。
あとやっぱビッグサイトの改修工事はやく終わってほしいなぁって思いました。
明日は家でのんびりです!

1