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

저도 최근 VSC에서 Zed로 넘어오게 됐습니다. 특히 블로그 글을 mdx로 작성하는 입장에서, 플러그인 없이도 mdx 문법과 미리보기를 지원하는 Zed가 정말 마음에 들었어요. 하지만 내장 터미널에서 한글 사용 시 글자가 제대로 표시되지 않고, 일부 작업 시 Zed가 강제 종료되는 문제가 생겨서 최근 이슈를 제보했습니다.

https://github.com/zed-industries/zed/issues/26036

https://github.com/zed-industries/zed/issues/27599

https://hackers.pub/@hongminhee/0195e9c3-2bc8-712a-a38e-aa355335ab0b/shares

0
0

🌘 《《小丑》、《黑客帝國》製片商Village Roadshow申請破產保護》
➤ 著名製片商Village Roadshow申請破產保護,歸咎於合作夥伴華納兄弟公司對《黑客帝國》系列電影的串流放映,突顯串流服務對影視產業的衝擊。
latimes.com/entertainment-arts
Village Roadshow Entertainment因長期合作夥伴華納兄弟公司的訴訟而申請破產保護,指控後者對《黑客帝國》系列電影的放映方式變更導致價值下降,彰顯影視產業向串流服務轉型的影響。
+ 影視產業的轉型在製片商Village Roadshow的破產申請中得到體現,呼應了現代串流媒體對傳統影視模式的挑戰。
+ Village Roadshow與華納兄弟公司的法律糾紛背後隱含了影視產業商業模式的轉變,對於未來的合作與投資有深遠的啟示。

0
0
0
0
0
0
0
0
0
0

저도 최근 VSC에서 Zed로 넘어오게 됐습니다. 특히 블로그 글을 mdx로 작성하는 입장에서, 플러그인 없이도 mdx 문법과 미리보기를 지원하는 Zed가 정말 마음에 들었어요. 하지만 내장 터미널에서 한글 사용 시 글자가 제대로 표시되지 않고, 일부 작업 시 Zed가 강제 종료되는 문제가 생겨서 최근 이슈를 제보했습니다.

https://github.com/zed-industries/zed/issues/26036

https://github.com/zed-industries/zed/issues/27599

https://hackers.pub/@hongminhee/0195e9c3-2bc8-712a-a38e-aa355335ab0b/shares

0
0
0
0

📢[72시간 100만 윤석열 파면촉구 긴급탄원 캠페인]📝 📍기간: 2025. 3. 30.(일) ~ 4. 1.(화) 24:00까지 📍위 탄원서는 참여해주신 시민들의 명의로 헌법재판소에 4. 2.(수)에 제출될 예정입니다. 📍문의: 윤석열즉각퇴진사회대개혁비상행동(yoonoutaction@gmail.com) 정의에는 중립이 없습니다. 지연된 정의는 정의가 아니라 불의입니다. 헌법재판소에게 내란 우두머리 윤석열의 파면을 촉구하는 서명캠페인에 함께 해주세요! 🔥 참여하기: bs1203.net/outnow

📢내란수괴 윤석열 8대0 만장일치 파면 촉구 전국 시민 서명

[72시간 100만 온라인 긴급 탄원 캠페인] 주권자 시민의 최후 통첩, 내란 우두머리 윤석열을 즉각 파면하라 헌법재판소는 내란수괴 윤석열을 8대 0으로 파면하라! 드디어 오는 4월 4일(금) 윤석열 탄핵심판 선고가 내려집니다. 작년 12월 3일 내란 우두머리 윤석열이 불법계엄을 선포한지 무려 4개월만입니다. 헌법을 위반한 것이 명백한 상황에서 헌법재판소는 납득할 수 없는 침묵을 이어왔습니다. 다른 탄핵사건과 비교하더라도 도무지 이해할 수 없는 침묵입니다. 정의에는 중립이 없습니다. 헌재는 이제라도 윤석열과 내란일당의 명백한 헌법위반과 헌법 파괴 행위에 대해 '파면' 결정을 내려야 합니다. 6대 2도 아니고 7대 1도 아닌 8대 0 만장일치 파면 뿐입니다. 만약 헌법재판관 중 그 누구라도 내란범죄를 저지른 윤석열을 비호하고 두둔한다면 헌법재판관으로서의 본연의 역할을 포기하는 것입니다. 주권자 시민들이 가까스로 지켜낸 민주주의와 헌정질서를 부정하는 일입니다. 헌법재판소의 선고 지연으로 대한민국은 혼란에 빠져있습니다. 헌법의 권위는 실추되었고, 사회혼란은 거듭되고 있으며, 내란 우두머리와 그 공범자들에 대한 수사와 재판도 제대로 이뤄지지 않고 있습니다. 국정의 혼란 속에 민생은 파탄나고 있습니다. 우리 주권자 시민들은 헌법재판소가 윤석열 만장일치 파면을 통해 헌법과 주권자 시민으로부터 부여받은 헌법수호의 사명을 다할 것을 촉구합니다. 우리들은 대한민국의 주권자 시민으로서 헌법재판소에게 우리들로부터 받은 권한을 행사할 것을 촉구합니다. 주권자 시민의 명령입니다. 헌법재판소는 내란 우두머리 윤석열을 8대 0으로 파면하십시오. <윤석열즉각퇴진·사회대개혁 비상행동과 더불어민주당, 조국혁신당, 진보당, 기본소득당, 사회민주당, 정의당, 노동당, 녹색당이 시민들께 탄원 서명을 제안합니다.> 📍기간: 2025. 3. 30.(일) 09:00~ 4. 2.(수) 11:00까지(2시간 연장) 📍위 탄원서는 참여해주신 시민들의 명의로 헌법재판소에 2025. 4. 2.(수)에 제출될 예정입니다. 📍문의: 윤석열즉각퇴진사회대개혁 비상행동(yoonoutaction@gmail.com) 📍비상행동 공식후원 계좌 : 카카오뱅크 7942-09-53862 심규협

docs.google.com · Google Docs

0
0
0
0
0
0
0
0
0
0
0
0
0
0

自宅をO、区役所をKとしたとき、点PがOを出発しKにたどり着くまでのエネルギーを求めよ
空気抵抗は考えないものとし、Pの質量は無限とする

0
0
0

L: 어제 보니까 트위터에서 '탄핵 되었다는둥 하는 거 만우절에 올리지 마라' 같은 글 돌더라 B: 있을만 하네 L: 근데 만우절에 헌재가 선고일 지정하면 그건 그거대로 웃기겠는데 B: 에이 설마

0
0
0

这是一场道德绑架,但“新闻”标题应为:一男子在街心公园故意伤人

昨儿午后在街心公园跑步。在小径上转过一个近乎九十度的拐角,从左侧种着树的土地上冲出一个五六岁(六七岁?)的小男孩儿,我尝试偏右躲闪,偏巧他也做出同样反应但又立刻往回跳步,因此我俩擦身而过。但就在我以为这不过是一段常见的插曲继续前进时,身后一阵风,我感到一头猛兽将我狠狠扑倒在地,身体左侧撞在万幸铺着塑胶跑道的小径上,惊恐和疼痛如慢动作般放大袭来,同时,那头猛兽在惯性的作用下从我左侧把自己也狠狠摔倒在土地上,还打了个滚儿。等我反应过来时,也不知道自己是怎么滚成了身体冲右躺在地上的状态。我仰着头,看到猛兽已经起身朝我走来,一边吼叫着:你为什么推我孩子!我还懵着一时起不来,但看他大有一旦我反应不当就要踢我脑袋的架势,挣扎着爬起来,猛兽逼近。危急之时,一位大爷从三岔口的一道赶过来喝止他:你要干吗?我看到了是你推她!接下来猛兽一边逼问我为什么推他孩子,一边要跟挺身而出的大爷干架。

0
0
0
0
0
0
0
0

そもそもalphabetがxyzドメインを使ったから有名になったようなところはあるよね。日本の自分みたいな世代だと「xyzドメイン? シティーハンターじゃん」ぐらいのイメージしかない。

0

明日以降の自分は完全なるアホでなにも今日のこと覚えてないという前提でコメントとかメモとか残さないと後悔することになるということを先週の自分はどうやら覚えてくれていたようでいま先週の自分に感謝してる :tony_smirking:

0

pi_roba shared the below article:

Monads: Beyond Simple Analogies—Reflections on Functional Programming Paradigms

洪 民憙 (Hong Minhee) @hongminhee@hackers.pub

While exploring functional programming languages, I've been reflecting on how different communities approach similar concepts. One pattern that seems particularly fascinating is how Haskell and OCaml communities differ in their embrace of monads as an abstraction tool.

The Elegant Power of Monads in Haskell

It's common to hear monads explained through analogies to concepts like JavaScript's Promise or jQuery chains. While these comparisons provide an entry point, they might miss what makes monads truly beautiful and powerful in Haskell's ecosystem.

The real strength appears to lie in the Monad typeclass itself. This elegant abstraction allows for creating generic functions and types that work with any type that shares the monad property. This seems to offer a profound unification of concepts that might initially appear unrelated:

  • You can write code once that works across many contexts (Maybe, [], IO, State, etc.)
  • Generic functions like sequence, mapM, and others become available across all monadic types
  • The same patterns and mental models apply consistently across different computational contexts

For example, a simple conditional function like this works beautifully in any monadic context:

whenM :: Monad m => m Bool -> m () -> m ()
whenM condition action = do
  result <- condition
  if result then action else return ()

Whether dealing with potentially missing values, asynchronous operations, or state transformations, the same function can be employed without modification. There's something genuinely satisfying about this level of abstraction and reuse.

OCaml's Different Approach

Interestingly, the OCaml community seems less enthusiastic about monads as a primary abstraction tool. This might stem from several factors related to language design:

Structural Differences

OCaml lacks built-in typeclass support, relying instead on its module system and functors. While powerful in its own right, this approach might not make monad abstractions feel as natural or convenient:

(* OCaml monad implementation requires more boilerplate *)
module type MONAD = sig
  type 'a t
  val return : 'a -> 'a t
  val bind : 'a t -> ('a -> 'b t) -> 'b t
end

module OptionMonad : MONAD with type 'a t = 'a option = struct
  type 'a t = 'a option
  let return x = Some x
  let bind m f = match m with
    | None -> None
    | Some x -> f x
end

OCaml also doesn't offer syntactic sugar like Haskell's do notation, which makes monadic code in Haskell considerably more readable and expressive:

-- Haskell's elegant do notation
userInfo = do
  name <- getLine
  age <- readLn
  return (name, age)

Compared to the more verbose OCaml equivalent:

let user_info =
  get_line >>= fun name ->
  read_ln >>= fun age ->
  return (name, age)

The readability difference becomes even more pronounced in more complex monadic operations.

Philosophical Differences

Beyond syntax, the languages differ in their fundamental approach to effects:

  • Haskell is purely functional, making monads essential for managing effects in a principled way
  • OCaml permits direct side effects, often making monadic abstractions optional

This allows OCaml programmers to write more direct code when appropriate:

(* Direct style in OCaml *)
let get_user_info () =
  print_string "Name: ";
  let name = read_line () in
  print_string "Age: ";
  let age = int_of_string (read_line ()) in
  (name, age)

OCaml's approach might favor pragmatism and directness in many cases, with programmers often preferring:

  • Direct use of option and result types
  • Module-level abstractions through functors
  • Continuation-passing style when needed

While this directness can be beneficial for immediate readability, it might come at the cost of some of the elegant uniformity that Haskell's monadic approach provides.

Reflections on Language Design

These differences highlight how programming language design shapes the idioms and patterns that emerge within their communities. Neither approach is objectively superior—they represent different philosophies about abstraction, explicitness, and the role of the type system.

Haskell's approach encourages a high level of abstraction and consistency across different computational contexts, which can feel particularly satisfying when working with complex, interconnected systems. There's something intellectually pleasing about solving a problem once and having that solution generalize across many contexts.

OCaml often favors more direct solutions that might be easier to reason about locally, though potentially at the cost of less uniformity across the codebase. This approach has its own virtues, particularly for systems where immediate comprehensibility is paramount.

After working with both paradigms, I find myself drawn to the consistent abstractions that Haskell's approach provides, while still appreciating the pragmatic clarity that OCaml can offer in certain situations. The typeclasses and syntactic support in Haskell seem to unlock a particularly elegant way of structuring code that, while perhaps requiring a steeper initial learning curve, offers a uniquely satisfying programming experience.

What patterns have you noticed in how different programming language communities approach similar problems? And have you found yourself drawn to the elegant abstractions of Haskell or the pragmatic approach of OCaml?

Read more →
0
0