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

Hamas says Israeli massacres continue despite upcoming Board of Peace meeting

“This criminal escalation comes ahead of the Board of Peace meeting, in a clear attempt to impose a bloody reality on the ground and send a message that all efforts and bodies concerned with establishing calm in Gaza are meaningless, and that the occupation is continuing its aggression despite all parties speaking of the necessity of adhering to the ceasefire agreement.”




0
0
0
匿名質問箱サービスMewkを作りました​:blobcatphoto:

・MFMやカスタム絵文字をそのまま使って質問・回答できる
・回答はそのままMisskeyに投稿できる
・フレームスタイルやカラーを自由にカスタマイズ可能
・自動で不快な質問をブロック

Misskeyらしい見た目・書き方を崩さずに使えるのが特徴です
MiAuthに対応しているので、Misskeyアカウントでそのままログインできます。
よかったら使ってみてください〜

https://mewk.app/
1
0
0
0
0
0
1

v.daum.net/v/2026021515... "장동혁 국민의힘 대표는 주택 6채를 보유한 다주택자이고 국민의힘 국회의원들 중 10명 중 4명은 다주택자로 모두 42명이나 된다"며 "본인들 다주택에는 '입꾹닫'하고, 1주택자인 이재명 대통령이 퇴임 후 돌아갈 하나 있는 집을 팔지 않는다고 비난하는 모습은 경이로울 정도" 그는 국민의힘을 '부동산불로소득지킨당'이라 칭하며 (중략) "국민의힘이 지키고자 하는 가치와 당의 지향점을 온전히 담았다"라고 덧붙였다.

[속보] 민주당, 국힘에 "장동혁 6채, 의원 41명 ...

0
1
0
0
0
0
0
0

I think I just had THE fediverse moment:
Scrolling through my timeline watching text posts, photos, a peertube video...A short video.

"ah nice MTB video" , I thought. Until I saw the handle: someone@loops. Wait.. I see a loops here. This isn't just a video. This is a video on A DIFFERENT Service. And I can seamlessly interact with it.

A new service just integrated seamlessly into my timeline. No "connect your account", no "extra app", no "extra login", no, it's just there

This is

0
0
1
0
0
0
1
1
0
0

Yes, you may be killed by falling human made space junk, but the odds remain small(ish) that will occur. The (almost inevitable) may also prevent future flights if all those in Low Earth Orbit start colliding, creating countless debris.

However, we *ALL* have to worry about the ‘chemical problem’ being created by SpaceX et al in the upper atmosphere. I have been banging on about this for a while and the attached article summarises the science in an easy to understand way - I have pasted the bit about the ‘chemical problem’ below because we *ALL* need to understand what the billionaires are doing to the planet while we are watching.

—————
Quote:

Debris on the ground attracts immediate attention, but atmospheric scientists are tracking a slower process with potentially larger consequences. When satellites vaporize in the mesosphere, 50 to 80 kilometers above Earth, they release clouds of vaporized metals that condense into aerosol particles. Those particles descend into the stratosphere, where Earth’s protective ozone layer resides.

Aluminum is the element of greatest concern. Upon reentry, aluminum oxidizes into aluminum oxide nanoparticles. A single 250 kilogram satellite generates roughly 30 kilograms of these particles. Unlike chlorofluorocarbons, which directly destroy ozone, aluminum oxide acts as a catalyst. One particle can facilitate chemical reactions that destroy thousands of ozone molecules over decades without being consumed.

Researchers from the University of Southern California’s Department of Astronautical Engineering documented an eightfold increase in atmospheric aluminum oxides between 2016 and 2022, directly correlating with the proliferation of satellite constellations, a finding reported in detail by CNET. In 2022 alone, reentering satellites released an estimated 41.7 metric tons of aluminum, approximately 30 percent more than the natural input from micrometeoroids.

Projections based on current deployment schedules suggest annual aluminum oxide emissions could reach 360 metric tons, a 646 percent increase over natural background levels, according to research highlighted by Popular Mechanics. Because these particles take 20 to 30 years to descend into the ozone layer, the atmospheric chemistry of today’s satellite fleet will not manifest as measurable ozone loss until the 2040s. By then, the upper atmosphere could already be saturated with catalysts.

NASA high altitude sampling flights over Alaska in 2023 detected the signature of this process. At approximately 60,000 feet, instruments found that 10 percent of stratospheric sulfuric acid particles larger than 120 nanometers contained aluminum and other metals traceable to spacecraft reentries, according to data presented at the American Astronomical Society meeting that year. The atmosphere now bears a permanent chemical marker of human activity in space.
—————

indiandefencereview.com/starli

0
0
0
0
0

Heute im IT-Bereich arbeiten heißt oft: Stellen werden gestrichen, Aufgaben nach Indien ausgelagert, »Effizienz« wird mit KI als Sparprogramm verkauft, Projekte werden kaputtgespart, Teams dauerhaft unterbesetzt, Budgets eingefroren, befristete Verträge zur Normalität gemacht und Wissen über Jahre hinweg entsorgt – Hauptsache die Excel-Zeile sieht gut aus.

Und danach wird ernsthaft gejammert, es fehlten »Fachkräfte«. Nein. Es fehlen keine Fachkräfte. Es fehlt der Wille, Leute auszubilden, ordentlich zu bezahlen und Arbeitsbedingungen zu schaffen, bei denen gute Leute bleiben wollen.

0
0
0
1
0
0

Meet the duck-billed tree frog (Triprion spatulatus). Found on Mexico’s Pacific coast, this species inhabits altitudes of up to 1,640 ft (500 m). Arboreal and primarily nocturnal, it feeds on invertebrates including crickets, grasshoppers, and spiders.

Photo: Cheryl Harleston López Espino (magazhu), CC BY-NC-ND 4.0, iNaturalist

via amnhnyc


Image Description
A photo of a duck-billed tree frog perched on a human hand. The amphibian is green in color with dark patterning and a pale white underbelly. 

Scientists have observed this critter using its shovel-like head to plug the openings of its burrows, guarding itself while it rests inside, which is why it’s also known as the shovel-headed tree frog.
0
1
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
0
0
0
0
0
0
0