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
0
1
1

nks:
"Q๏ผšใชใ‚“ใง่ญฐๅ“กๅฎšๆ•ฐๅ‰Šๆธ›ใ™ใ‚‹ใฎ๏ผŸ
A๏ผš้‡Ž็”ฐใ•ใ‚“ใฎๆ‚ฒ้ก˜ใงๅฎ‰ๅ€ใ•ใ‚“ใจใฎ็ด„ๆŸใ ใ‹ใ‚‰
ๅ›ฝๆฐ‘๏ผš็Ÿฅใ‚‰ใ‚“ใŒใช" โ€” Bluesky
bsky.app/profile/yuki-nks.bsky

0

ๆœบใฎไธŠใซโ€‹:kitsunechan:โ€‹ใฎใ‚ขใ‚ฏใ‚นใ‚ฟใจ
ใฐใ‚‹ใถC
๐Ÿใกใ‚ƒใ‚“ใฎใ‚ขใ‚ฏใ‚ญใƒผใŒใ‚ใ‚‹ใฎใง
ใ“ใ‚Œใฏๆ˜Žใ‚‰ใ‹ใซใƒžใ‚คใƒŠใ‚นใ‚คใ‚ชใƒณใŒๅ‡บใฆใ„ใพใ™
โ€‹:blobcat_rin_tekateka:โ€‹

1
0
1

Day 1 of Advent of Compiler Optimisations!

Why do compilers love `xor eax, eax` for zeroing registers? It's brilliant: saves bytes compared to `mov eax, 0`, AND x86 CPUs recognise this "zeroing idiom" early in the pipelineโ€”breaking register dependencies and removing it from execution entirely. Even better: writing to `eax` zeroes the top 32 bits of `rax` for free, handling 64-bit longs in one instruction.

Read more: xania.org/202512/01-xor-eax-eax
Watch: youtu.be/eLjZ48gqbyg

0
0
0

ๆ—ฅ็…งๆ™‚้–“่ถณใ‚Šใฆใชใ„ใจ่ฝใก่พผใฟใŒใกใซใชใ‚‹ใฎใฏใƒžใ‚ธใƒžใ‚ธใฎใƒžใ‚ธใ€‚่‰ฏใ„ใ“ใจ็„กใ„ใฎใงๅฏใ‚‹ใฎใŒๅ‰ใ€‚

1
0
0
0
0
0
1
0
0
0

้›ปๅญ่จผๆ˜Žๆ›ธใฏใ€ๆœŸ้™ๅˆ‡ใ‚ŒๅพŒใ‚‚3ใ‚ซๆœˆ้–“ใฏไธ€ๅฟœใ€ๅฅๅบทไฟ้™บ่จผใจใ—ใฆ่ขซ ไฟ้™บ่ณ‡ๆ ผใ ใ‘ใŒ็ขบ่ชๅฏ่ƒฝใ€‚
ๅŽšๅŠด็œใ€Œ3ใ‚ซๆœˆไปฅๅ†…ใซ่ณ‡ๆ ผ็ขบ่ชๆ›ธใŒไบคไป˜ใ•ใ‚Œใพใ™ใ€

ใงใ‚‚ไบคไป˜ใ™ใ‚‹ใฎใฏ่‡ชๆฒปไฝ“ใ‚„ๅ”ไผšใ‘ใ‚“ใฝใชใฉใฎๅ„ไฟ้™บ่€…ใ€‚
ไฝ™่จˆใช็ขบ่ชๆฅญๅ‹™ใŒใฎใ—ใ‹ใ‹ใ‚‹ใ€‚ไธ€ๆ™‚็š„ใซ็„กไฟ้™บ็Šถๆ…‹ใซ้™ฅใ‚‹ใƒชใ‚นใ‚ฏใ‚‚๏ผŸ

โ˜๏ธใƒžใ‚คใƒŠไฟ้™บ่จผใฏไปปๆ„ใ ใ‚ˆ
ใ€€ๅ–ๅพ—ใ—ใชใใฆใ‚‚่ณ‡ๆ ผ็ขบ่ชๆ›ธใŒใ‚‚ใ‚‰ใˆใ‚‹ใ‹ใ‚‰็„กไฟ้™บใซใฏใชใ‚‰ใชใ„ใ‚ˆใ€‚
ใ€€ใƒžใ‚คใƒŠไฟ้™บ่จผใ‚’็™ป้Œฒใ—ใกใ‚ƒใฃใŸไบบใ‚‚่งฃ้™คใ™ใ‚Œใฐใ‚‚ใ‚‰ใˆใ‚‹ใ‚ˆใ€‚

ใ€Žใƒžใ‚คใƒŠไฟ้™บ่จผใฎ่งฃ้™ค็”ณ่ซ‹ใ€็ดฏ่จˆใง5ไธ‡8000ไปถใซใ€€1ๆœˆใฏ1ไธ‡ไปถ่ถ…ใˆใ‚‹ใ€
ๆฏŽๆ—ฅๆ–ฐ่žใ€€2ๆœˆใฎ่จ˜ไบ‹
mainichi.jp/articles/20250218/

ใ€€ใ€€ใ€€

ๅŽš็”ŸๅŠดๅƒ็œใฎใƒใƒฉใ‚ทใ€‚
ใƒžใ‚คใƒŠไฟ้™บ่จผใ‚’ใŠๆŒใกใงใชใใฆใ‚‚
่ณ‡ๆ ผ็ขบ่ชๆ›ธใซใ‚ˆใ‚Š
ใ“ใ‚Œใพใง้€šใ‚ŠๅŒป็™‚ใซใ‹ใ‹ใ‚Œใพใ™ใ€‚

ๅฅๅบทไฟ้™บ่จผใฎๆœ‰ๅŠนๆœŸ้™ใŒๅˆ‡ใ‚Œใ‚‹ๅ‰ใซ
ใ€Œ่ณ‡ๆ ผ็ขบ่ชๆ›ธใ€ใŒ็„กๅ„Ÿใง็”ณ่ซ‹ใซใ‚ˆใ‚‰ใšไบคไป˜ใ•ใ‚Œใพใ™ใ€‚

ใƒžใ‚คใƒŠไฟ้™บ่จผใฎๅˆฉ็”จ็™ป้Œฒใ‚’ใ—ใฆใ„ใฆใ‚‚ใ€
ใƒžใ‚คใƒŠใƒณใƒใƒผใ‚ซใƒผใƒ‰ใงใฎๅ—่จบใชใฉใŒๅ›ฐ้›ฃใชใ‹ใŸ (75ๆญณไปฅไธŠใฎ้ซ˜้ฝข่€…ใ€้šœๅฎณ่€…ใชใฉ) ใฏ็”ณ่ซ‹ใ™ใ‚Œใฐ็„กๅ„Ÿใงไบคไป˜ใ•ใ‚Œใพใ™ใ€‚
0
0
0
0
0
0
0
1
0

UR์ž„๋Œ€์ฃผํƒ์„ ์•Œ์•„๋ณด๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
์‹ ์„ธ๊ณ„๋„ค์š” ์ด๊ฑฐ.
์›ํ•˜๋Š” ์ง€์—ญ์˜ ๋งค๋ฌผ ๋‚˜์˜ค๋ฉด

๋ฐ”๋กœ๋ฐ”๋กœ ์ง‘์–ด๊ฐ€์•ผ๊ฒ ์Šต๋‹ˆ๋‹ค.

ํ›„ํ›„ํ›— :blobcat_fu_lookingyou6_c:

0

็พไปฃไบบใฏ
ใƒปๅฟ™ใ—ใใฆๆ—ฅๅ…‰ๆตดใณใ‚‰ใ‚Œใชใ„
ใƒปSNSใ‚„ๅ‹•็”ปใ‚ตใ‚คใƒˆใฎๆƒ…ๅ ฑ้Žๅคšใง่„ณใŒไผ‘ใพใ‚‰ใชใ„
ใƒป็ก็œ ๆ™‚้–“ใŒ่ถณใ‚Šใชใ„

ใ“ใ‚Œไธ‡็—…ใฎๅ…ƒใงใ™

2
0

ใ€Œใƒญใƒƒใ‚ฏๅฒใฎไธญใฎ่–ๆ›ธใ€ใ€€NHKใƒฉใ‚ธใ‚ชใง12ๆœˆ็‰น้›†ใ€€6ๆ—ฅใฎ็ฌฌ1ๅ›žใงใฏใƒ“ใƒผใƒใƒปใƒœใƒผใ‚คใ‚บ๏ผใƒ“ใƒผใƒˆใƒซใ‚บ๏ผใƒ‰ใƒชใƒผใƒปใƒ‘ใƒผใƒˆใƒณใฎๆฅฝๆ›ฒใ‚’่งฃ่ชฌ
amass.jp/186524/

0
0

Prezident Petr Pavel v pondฤ›lรญ pล™ijal dalลกรญ tล™i kandidรกty do vlรกdy za hnutรญ ANO โ€“ na ministryni financรญ Alenu Schillerovou, na ministra prรกce a sociรกlnรญch vฤ›cรญ Aleลกe Juchelku na ลกรฉfa resortu prลฏmyslu a obchodu Karla Havlรญฤka.
๐ŸŒ Vรญce na webu ฤŒT24.

0
0

๊ฒฝ๊ธฐ๋„ ์˜ฌ๋ผ์˜ค๊ณ  ๊ทผ์ฒ˜ ์‚ฌ๋Š” ๋‚˜๋ž˜์˜น์„ ๋งŒ๋‚˜์ž๊ณ  ์„œ๋กœ ์•ฝ์†ํ•œ์ง€ 584648์–ต๋…„์ด ๋˜์—ˆ๋Š”๋ฐ๋„ ์•„์ง ๋ชป ๋งŒ๋‚˜๊ณ  ์žˆ๋‹ค

0

ไธญๅ›ฝใงๅฃฒใฃใฆใ‚‹3่ผชEVใงไบŒไบบไน—ใ‚Šใงใใ‚‹ใ‚ˆใ†ใซๆณ•ๅพ‹ๆ”นๆญฃใ—ใฆๅฃฒใฃใฆใใ‚Œใ‚Œใฐใ€ใƒ€ใ‚คใƒใƒ„ใฏๅฏใฆใฆใ„ใ„ใงใ™ใ€‚ใƒˆใƒจใ‚ฟใ ใ—

ใฃใฆใ„ใ†ใ‹ใ€ใšใฃใจ่จ€ใฃใฆใ‚‹ใ‘ใฉ3่ผชEVใซใƒ‰ใ‚ขใ‚’ใคใ‘ใ‚ŒใฐใƒŸใƒ‹ใ‚ซใƒผๆ‰ฑใ„ใงไธ€ไบบใ—ใ‹ไน—ใ‚Œใชใ„ใฎใซใ€ใƒ‰ใ‚ขใ‚’ๅ–ใ‚Œใฐใ‚ตใ‚คใƒ‰ใ‚ซใƒผๆ‰ฑใ„ใซใชใฃใฆไบŒไบบไน—ใ‚Šใงใใ‚‹ๆ™‚็‚นใงๆณ•ๅพ‹ใŒใƒใ‚ฐใฃใฆใ‚‹ใ—ใ€ๆ—ฅๆœฌใฎๆณ•ๅพ‹ใŒใ‚ฏใ‚ฝใ™ใŽใ‚‹ใ‚“ใ ใ‚ˆ๏ผใ“ใ†ใ„ใ†ใจใ“ใ‚ๆ˜ฏๆญฃใ—ใ‚ใ‚ˆ๏ผ

0
0
0
0
0
0
1

At this weekend I finally established another network in my home โ€” a ZigBee network. A looong time ago (in 2010 year) I touched the ZigBee networking in my university (ITMO, previously IFMO, in Saint-Petersburg) โ€” these times it was a new technology, not used widely. And as a student I have some fun time playing with ZigBee main router, supplemental router and end-devices. You can view old photos and screenshots of old software on a my extremely old blog: h0rr0rr-drag0n.blogspot.com/20 (and read a blogpost, if you understand Russian).

It is kindly fascinating, that now, after 15 years, I can just buy some ZigBee-powered devices from AliExpress (using Black Friday discounts) and connect them to the network inside my house right in the way I did it in the university 15 years ago!

Sadly, although I bought native supported main router device, based on the EFR32MG2 with some software from Ember (EZSP v8) inside, the OpenHAB doesn't support this device natively โ€” it supports it, but since my server is running NetBSD, I got problems with some bundled with OpenHAB things. Looks like some native libraries (rxtx-java) don't have bundled NetBSD versions. And the same library in the repository built for Java 8, not for Java 17.

So, I decided to use Zigbee2MQTT, not to build the necessary Java library myself. It was kinda scary โ€” use program, which connects my ZigBee network via ZigBee USB-dongle to the MQTT server โ€” which is written on JavaScript :drgn_hide: . Not on the C (as I can totally understand, for a such low-level program, operating with embedded devices) or at least on the C++/Perl/Python/whatever. But, looks like it works good enough, if I don't try to pair the device in wrong mode (my window sensors has two modes to pair them with network: first "common" mode causes zigbee2mqtt to silently crash and the second "compatible" mode works without problems).

And I could understand now, why people has so much problems with smart home security. Installed MQTT server mosquitto โ€” it allows unauthenticated connections by default. Installed zigbee2mqtt โ€” it allow connections to frontend without any password by default :drgn_sigh:

At least these two services don't each much memory: 1.2 Mb for Mosquitto and 75.6 Mb for ZigBee2MQTT.

For now, my ZigBee sensors works pretty well and robust, like these devices from university 15 years ago :drgn_aww:

OpenHAB main page with some labels in it. Labels divided into two parts: "Weather" and "Home".

On the "Weather" part there are labels with the next contents:
1) Temperature (-0.1ยฐC) with temperature graph on the background.
2) Textual description of the weather (cloudy)
3) Pressure (759,062 mmHg) with pressure graph on the background
4) Humidity (93%)
5) Wind speed (18,7 km/h)

On the "Home" part there are the next labels with data from my ZigBee sensors:
1) Temperature in the living room (23.3ยฐC) with temperature graph on the background.
2) Temperature in the kitchen (22.4ยฐC) with temperature graph on the background.
3) Humidity in the living room (23.0%) with humidity graph on the background.
4) Humidity in the kitchen (29.0%) with humidity graph on the background.
5) State of the window in the living room (window opened).Zigbee2MQTT dashboard with three devices in it:
1) Temperature sensor in kitchen. It exposes the temperature, humidity, signal level and battery level. Also it provides controls to set temperature units, and to calibrate readings of temperature/humidity.
2) Temperature sensor in living room. It has the same controls.
3) Sensor with magnet contact, installed on the window in the living room. It exposes, set of contact, "low battery" signal, battery level and signal level.
0
0
1
0

Day 1 of Advent of Compiler Optimisations!

Why do compilers love `xor eax, eax` for zeroing registers? It's brilliant: saves bytes compared to `mov eax, 0`, AND x86 CPUs recognise this "zeroing idiom" early in the pipelineโ€”breaking register dependencies and removing it from execution entirely. Even better: writing to `eax` zeroes the top 32 bits of `rax` for free, handling 64-bit longs in one instruction.

Read more: xania.org/202512/01-xor-eax-eax
Watch: youtu.be/eLjZ48gqbyg

0
0
0
0

์˜๋ฃŒ์ฐจ๋ณ„ ๋งž์„œ๊ณ , ์—ด๋ฌด๊น€์น˜ ๋‚˜๋ˆ„๊ณ โ€ฆ HIV ๊ฐ์—ผ์ธ์ด ๊ฐ์—ผ์ธ ๋Œ๋ณด๋Š” โ€˜์„œ๋กœ๋Œ๋ด„โ€™ 12์›”1์ผ ์„ธ๊ณ„ ์—์ด์ฆˆ์˜ ๋‚  ๋“ฃ๋Š” ๋Œ๋ด„ ์ด์•ผ๊ธฐ โ€œ์šฐ๋ฆฌ์—๊ฒŒ ๋Œ๋ด„์€ ์ธ์ƒ์˜ ๋ฌธ์ œ ํ•ด๊ฒฐํ•˜๊ณ  ์‚ถ์„ ๋†€์ด๊ฐ™์ด ๋งŒ๋“œ๋Š” ์‹ค๋œจ๊ธฐ๊ฐ™์•„โ€ ์ˆ˜์ • 2025-12-01 16:16 h21.hani.co.kr/arti/society...

์˜๋ฃŒ์ฐจ๋ณ„ ๋งž์„œ๊ณ , ์—ด๋ฌด๊น€์น˜ ๋‚˜๋ˆ„๊ณ โ€ฆ HIV ๊ฐ์—ผ์ธ์ด ๊ฐ...

0
3

ๅธฐใ‚ŠใŒใ‘ใซ้ฃŸในใฆใใŸ็ซ้‹็ฑณ็ทš๏ผˆๆœŸ้–“้™ๅฎš๏ผ‰
ใ‚ใกใ‚ƒใใกใ‚ƒ่พ›ใ‹ใฃใŸ
ๆœ€่ฟ‘้ฃŸในใŸใ‚‚ใฎใฎไธญใง้–“้•ใ„ใชใไธ€็•ช่พ›ใ‹ใฃใŸ
โ€‹:polarbear_fire:โ€‹

1
1
0
0
0
3
2