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

앞으로는 사법시스템을 이렇게 분리 및 재정립해야함. 1. 사람이 이해할수 있는 언어로 법을 만드는 사람들. 2. 만들어진 법이 원래 의도를 최대한 반영하고 예외가 없도록 엄격하게 코드/룰셋 혹은 머신러닝 모델 즉 AI를 구현하는 사람들 3. 판결을 내리는 모델이 방해받지 않고 독립적으로 운영하고 돌리도록 책임지는 사람들 4. 만들어진 판결 AI와 내리는 판결을 검증하고 분석하는 사람들 5. 1-4번이 제대로 동작하는지 검증 및 보증하는 사람들 이상한 판결이 나오거나 잘못되면 1,2,3,4,5 다 같이 감옥에 보내면 됩니다 ㅋ

0

skebの宣伝ツイが2000いいねとか500リツイートとかに伸びてる人のを見て、イイナ〜さぞかし売れっ子なんだろうなと思ったりするが

える しっているか
宣伝ツイが伸びることと実際にリクエストがバンバンくるのはあまり関係がない
(全く関係ないわけではないが)
宣伝ツイがすんげ〜伸びるのにリクエストいっっっっっこも来ないことはよくありすぎてほぼ通常

逆に一回の宣伝ツイごときで獲得できたら凄いまである

1
1
0
0
0
0
36
0
1
1

グレーバーとかネグリ=ハートとか、国家否定まではわかんだけど、その後は抽象的な人間概念でなんかもやーっと社会を作れるとするきらいがあるので、その点薄っぺらいなぁ、と感じています。

宗教家としては、文明の歴史というもは捨象してしまうのが、もったいないというか空想的というか。

0
0
1
1
0

我現在告訴你,「活在當下」,這好像沒啥說服力。但如果這句話由一位漸凍人症患者說出,他已明顯病徵嚴重,而且這幾天已過世,他最後對著鏡頭說出的「活在當下」,便劇力萬鈞。

這是Netflix備受爭議的紀錄片《最後一席話》(Famous Last Words)最新內容:這幾天逝世的演員Eric Dane也錄製了他的遺言,目前已上架。

紀錄片帶來的痛苦是極其強大的,Eric作為類型演員,觀眾更熟悉的是他在無數影集與A級到Z級動作片裡的硬漢形象與身手,但看到他幾乎無法動彈,面部僵硬,掙扎地說出與病痛抗爭的痛苦與釋懷,他說出的這些字句突然變得令人難以承受。

我實在無法輕易推薦《Famous Last Words》,更無法想像幕後製作過程是如何進行,是N家或受訪者哪一方主動接觸,劇組又是如何進行溝通與拍攝,這一切都難以想像。

但是,你還是能從他在《最後一席話》的他,與《實習醫生格蕾》裡的他之間的相似性,感受真實的他,那種相似性依舊真實存在,他的身軀無法移動,他失去了格蕾裡的八十塊腹肌,但漸凍人症無法移除他的幽默感,他的精神依舊很好,他依舊有勇氣直面死亡,這殘忍又莊嚴……而且充滿生命力。

May be an image of one or more people and text
0
0
0
0
0

뒷마당 탐조클럽...은 탐라 새집사님 추천도 있어서+블배 칼 도우의 취미가 탐조(not 탐정조수 yes birdwatching)라는 것도 알게되고 등등에 갑자기 눈앞에 나타났잖아. 이러면 아무래도 운명의 만남으로 겸허히 받아들여야만(젼

0
有些人覺得年輕時要努力打拚、盡量存錢,很多事可以等年紀大了、退休之後再做,例如什麼環遊世界啦學畫、學琴啦,反正年輕時你覺得浪費錢浪費時間,但好像很有趣的事,都可以等賺夠了錢再來做。

可是這些人到了年紀大了退休的時候,也常常會抱怨因為年輕時太打拚所以身體變得不大好或頭腦太疲勞,環遊世界學畫學琴什麼的,要嘛沒體力要嘛沒興致要嘛健康狀況不允許。

所以計劃不是不能做,但真該好好計劃的不見得是很具體的某件事──那件事可能在很多因素下忽然變得很容易完成或者失去魅力──真正該做的老年計劃,不見得是要去環遊世界學畫學琴,而是如何一個人好好過日子。

https://moo.ink/8qc9vv
https://moo.ink/8qca39
0
0
0
0
0
0
9
0
1

Defer available in gcc and clang

About a year ago I posted about defer and that it would be available for everyone using gcc and/or clang soon. So it is probably time for an update.

Two things have happened in the mean time:

  • A technical specification (TS 25755) edited by JeanHeyd Meneide is now complete and moves through ISO’s complicated publication procedures.
  • Both gcc and clang communities have worked on integrating this feature into their C implementations.

I have not yet got my hands on the gcc implementation (but this is also less urgent, see below), but I have been able to use clang’s which is available starting with clang-22.

I think that with this in mind everybody developing in C could and should now seriously consider switching to defer for their cleanup handling:

  • no more resource leakage or blocked mutexes on rarely used code paths,
  • no more spaghetti code just to cover all possibilities for preliminary exits from functions.

I am not sure if the compiler people are also planning back ports of these features, but with some simple work around and slightly reduced grammar for the defer feature this works for me from gcc-9 onward and for clang-22 onward:

#if __has_include(<stddefer.h>)
# include <stddefer.h>
# if defined(__clang__)
#  if __is_identifier(_Defer)
#   error "clang may need the option -fdefer-ts for the _Defer feature"
#  endif
# endif
#elif __GNUC__ > 8
# define defer _Defer
# define _Defer      _Defer_A(__COUNTER__)
# define _Defer_A(N) _Defer_B(N)
# define _Defer_B(N) _Defer_C(_Defer_func_ ## N, _Defer_var_ ## N)
# define _Defer_C(F, V)                                                 \
  auto void F(int*);                                                    \
  __attribute__((__cleanup__(F), __deprecated__, __unused__))           \
     int V;                                                             \
  __attribute__((__always_inline__, __deprecated__, __unused__))        \
    inline auto void F(__attribute__((__unused__)) int*V)
#else
# error "The _Defer feature seems not available"
#endif

So this is already a large panel of compilers. Obviously it depends on your admissible compile platforms whether or not these are sufficient for you. In any case, with these you may compile for a very wide set of installs since defer does not need any specific software infrastructure or library once the code is compiled.

As already discussed many times, the gcc fallback uses the so-called “nested function” feature which is always subject of intense debate and even flame wars. Don’t worry, the implementation as presented here, even when compiled with no optimization at all, does not produce any hidden function in the executable, and in particular there is no “trampoline” or whatever that would put your execution at risk of a stack exploit.

You may also notice that there is no fallback for older clang version. This is because their so-called “blocks” extension cannot easily be used as a drop-in to replace nested function: their semantics to access variables from the surrounding scope are different and not compatible with the defer feature as defined by TS 25755.

So for example if you are scared of using big VLA on the stack, you may use the above code in headers and something like

double* BigArray
  = malloc(sizeof(double[aLot]));
if (!BigArray {
  exit(EXIT_FALURE);
}
defer { 
  free(BigArray); 
}

to have an implementation of a big array with a failure mode for the allocation.

Or if you want to be sure that all your mutexes are unlocked when you leave a critical section, use and idiom as here

{
  if (mtx_lock(&mtx) != thrd_success) {
    exit(EXIT_FAILURE);
  }
  defer {
    mtx_unlock(&mtx);
  }

  ... do something complicated ...

  if (rareCondition) {
    return 42;
  }

  ... do something even more complicated ...
}

Just notice, that you’d always have to use the defer feature with curly braces to ensure that the gcc fallback works smoothly.

0
1
1
0
0
0
0
0
0
0
0
0

The headline does not convey how completely batshit this story is. The Archive Today (archive.ph etc) admin weaponized the site's captcha to attack a blogger who wrote about them and *altered archived screenshots* as part of the attack. arstechnica.com/tech-policy/...

Wikipedia blacklists Archive.t...

0
0
0
1

The whole software factory thing is real and powerful. Lately have been feeling the magnitude of the moment. The opportunity and the challenge of it. Things will be so different even in the next few years. And yet, we will be the same.

0
0
1
0
0
0
有些人覺得年輕時要努力打拚、盡量存錢,很多事可以等年紀大了、退休之後再做,例如什麼環遊世界啦學畫、學琴啦,反正年輕時你覺得浪費錢浪費時間,但好像很有趣的事,都可以等賺夠了錢再來做。

可是這些人到了年紀大了退休的時候,也常常會抱怨因為年輕時太打拚所以身體變得不大好或頭腦太疲勞,環遊世界學畫學琴什麼的,要嘛沒體力要嘛沒興致要嘛健康狀況不允許。

所以計劃不是不能做,但真該好好計劃的不見得是很具體的某件事──那件事可能在很多因素下忽然變得很容易完成或者失去魅力──真正該做的老年計劃,不見得是要去環遊世界學畫學琴,而是如何一個人好好過日子。

https://moo.ink/8qc9vv
https://moo.ink/8qca39
0
0

Thinking through some PL design questions this evening, and it occurs to me...

There is very little, in practice, here in the year 2026, that prevents me from naming a programming language with an emoji.

0
0