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

Rustใ€่จ€่ชžใ‚ตใƒผใƒใŒๅ„ช็ง€ใ ใ‹ใ‚‰ใ‚ณใƒผใƒ‰ใƒชใƒผใƒ‡ใ‚ฃใƒณใ‚ฐใŒๆ—ใฃใฆใ„ใ„ใชใ€‚ใ‚ใ‹ใ‚‰ใชใ„ใจใ“ใ‚ใŒใ‚ใฃใŸใ‚‰ใฉใ‚“ใฉใ‚“ๆŽ˜ใฃใฆใ„ใใ“ใจใŒใงใใ‚‹ใ€‚ๅ‹‰ๅผทใ‚‚ๅ…ผใญใฆใ—ใฐใ‚‰ใๆจ™ๆบ–ใƒฉใ‚คใƒ–ใƒฉใƒชใ‚’่ชญใ‚“ใงใ„ใๆ—…ใ‚’ใ™ใ‚‹ใฎใ‚‚ๆ‚ชใใชใ•ใใ†ใ€‚

1
0
0
0
0

Do you ever have the need for an UUID on a Linux system but donโ€™t want to pull in a whole external dependency which most likely doesnโ€™t even do UUIDโ€™s properly?

Just cat /proc/sys/kernel/random/uuid or fopen it from your favourite C ABI compatible language and enjoy the UUID-breeze :ym_sunglasses:

0
1
0
0
0
0

spoke to me for it is all about activism, imagining a future we would all want to live in. There is the tech and aesthetics to depict, but there is also the worldview, for clean energy without social justice is greenwashing! In this I imagine direct democracy in a sustainable world free from capitalism. Help me make it! Share with your friends or donate if you can!

Details: dilmandila.com/embracing-solar

1041/2000

I'm making a film in the genre, live action (rather than animation) set in the near future for I want to imagine practical alternatives to capitalism. Given recent events in and other places battling fascism, I envision a world where direct democracy is possible, so no central governments, politicians, or police/military. Help me make it!

1145/2000

Details dilmandila.com/embracing-solar

0
0
0
0
1
0
0
0
0

Designing idempotency for services is really easy to over engineer.

The design pattern matters more than the specific tech:

1. Generate a unique id (e.g. v4 UUID) and attach it to every call
2. Handle failure gracefully with an exponential backoff + jitter
3. Record both the attempt AND the complete result
4. Check records before execution

This is not to say doing this is easy and that there aren't contexts will sway you on specific choices of tech. But learn the pattern first.

0
0
0
0
0

๊ณ„๊ธ‰๋„๋ฅผ ๋“ค์ด๋ฏธ๋Š” ์‚ฌํšŒ

์š”์ฆ˜ ํ•œ๊ตญ ์œ ํŠœ๋ธŒ์—๋Š” XX ๊ณ„๊ธ‰๋„, ๋ผ๋Š” ์‹์œผ๋กœ ํŠนํžˆ ๋ธŒ๋žœ๋“œ ์ˆœ์œ„ ๋งค๊ธฐ๋Š” ์ปจํ…์ธ ๊ฐ€ ๋งŽ์€๋ฐ, ๊ฐœ๊ฐœ์˜ ํŠน์ • ์ƒํ’ˆ (๊ฐœ์ธ์  ์„ ํ˜ธ) ์ˆœ์œ„ ์ •๋„๋ฉด ๋ชฐ๋ผ๋„ ๋ธŒ๋žœ๋“œ ๊ณ„๊ธ‰์ด๋ผ๋Š”๊ฒŒ ๋ฌด์Šจ ์˜๋ฏธ๊ฐ€ ์žˆ์„์ง€ ๋ชจ๋ฅด๊ฒ ๋‹ค. ๋ฌผ๋ก  ๊ณ ๊ธ‰์ด๋ƒ ๊ฐ€์„ฑ๋น„๋ƒ, ์—ผ๊ฐ€๋ƒ ์ •๋„๋กœ์•ผ ๋‚˜๋‰˜๊ฒ ์ง€๋งŒ ๊ทธ ๋‚ด๋ถ€๊นŒ์ง€ ์„ธ์„ธํžˆ ์ •ํ•  ์ •๋„๋กœ ๊ฒฝํ—˜์ด ๋งŽ์€ ์‚ฌ๋žŒ์ด ์–ผ๋งˆ๋‚˜ ์žˆ์„๊นŒ ์‹ถ๊ณ , ๊ทธ๋Ÿฐ ์‚ฌ๋žŒ์ด ์žˆ๋”๋ผ๋„ ๊ทธ๋ ‡๊ฒŒ ๊ฐ„๋‹จํ•˜๊ฒŒ ์ •ํ•  ์ˆ˜ ์žˆ์„๊นŒ. ์ˆœ์œ„์— ๊ณ„๊ธ‰์ด๋ผ๋Š” ํ‘œํ˜„์„ ๋ถ™์ด๋Š” ๊ฒƒ๋„, ๋ˆ๋งŒ ๋‚ด๋ฉด ๋ฐ”๋กœ ์˜ฌ๋ผ๊ฐ€๋Š” ๊ฒŒ ๋ฌด์Šจ ๊ณ„๊ธ‰์ธ๊ฐ€. ํ•œ๊ตญ์ธ์€ ์ƒ์œ„ ๊ณ„๊ธ‰์„ ์›ํ•˜์ง€๋งŒ ์ •์ž‘ ๊ณ„๊ธ‰์ด ๋ญ”์ง€ ์ž˜ ๋ชจ๋ฅธ๋‹ค. ๊ทธ ํ‹ˆ์„ ํƒ€๊ณ  ์‹ธ๊ตฌ๋ ค ํ™๋ณด๊พผ๋“ค์ด ๊ณ„๊ธ‰๋„๋ฅผ ๋“ค์ด๋ฏธ๋Š” ์‚ฌํšŒ๊ฐ€ ๋˜์–ด ๋ฒ„๋ ธ๋‹ค.

0

๐Ÿ‡ช๐Ÿ‡บโš–๏ธ "According to experts and activists, the overhaul of existing legislation could enable big tech companies to collect significantly more user for training their models. But that could come with a huge price tag [โ€ฆ]"

๐Ÿ‘€ Read more: cybernews.com/news/european-un

0
0
0
0
0
0
1
0
Y = forall A. ฮปf.
    let g = thunk (ฮปx. (force f) ((force (unroll x)) x)) : thunk ((ฮผX. thunk (X -> A)) -> A)
    in g (roll g : ฮผX. thunk (X -> A))

๋ฅผ ํƒ€์ž… ๊ฒ€์‚ฌํ•œ ๊ฒŒ ์ง€๋‚œ ์ผ์ด์—ˆ๋‹ค.

(Y[ฮปโŸจ isEven: nat -> bool, isOdd: nat -> bool โŸฉ]) (ฮปm.
    ฮปโŸจ
        isEven: ฮปn. match n {
            Nat.zero as n => return true
            Nat.succ as n => return (force m::isOdd) (n.0)
        }
        isOdd: ฮปn. match n {
            Nat.zero as n => return false
            Nat.succ as n => return (force m::isEven) (n.0)
        }
    โŸฉ
)

์ด์ œ ์œ„ ์ฝ”๋“œ๋ฅผ ๋Œ€์ถฉ ํƒ€์ž… ๊ฒ€์‚ฌํ•  ์ˆ˜ ์žˆ๋Š” ๊ฑฐ ๊ฐ™๋‹ค.

์ด์ œ ์‹œ๋งจํ‹ฑ์€ ํ•„์š”ํ•œ ๋งŒํผ ๊ตฌํ˜„ํ–ˆ์œผ๋‹ˆ ๋“œ๋””์–ด ์‹ ํƒ์Šค๋‚˜ ์ฝ”๋“œ์  ์œผ๋กœ ๋„˜์–ด๊ฐˆ ์ˆ˜ ์žˆ๊ฒ ๋‹ค.

3
0
0
0
0
0
0
0

๋ฌธ๋“ ๋– ์˜ค๋ฅธ TMI
์–ด๋А ์ •๋„ ๋“ฑ๊ธ‰์ด ์žˆ๋Š” ํ˜ธํ…”์— ๊ฐ€๋ฉด ์ƒค์›Œ์บก์ด ์žˆ์Šต๋‹ˆ๋‹ค.
์ƒค์›Œ ํ•  ๋•Œ ๋จธ๋ฆฌ์— ๋ฌผ์ด ๋‹ฟ์ง€ ์•Š๊ฒŒ ํ•˜๋Š” ์šฉ๋„์ž…๋‹ˆ๋‹ค.
์ƒค์›Œ ํ•  ๋•Œ ๋จธ๋ฆฌ ๊ฐ™์ด ๊ฐ์œผ๋ฉด ๋˜๋Š”๊ฑฐ ์•„๋‹ˆ๋ƒ๊ตฌ์š”?
๊ทธ๊ฒŒ ์•„๋‹Œ ๋‚˜๋ผ๋“ค์ด ๋” ๋งŽ์Šต๋‹ˆ๋‹ค.

1
0
2
0
0