HNHacker News
TopNewBestAskShowJobs

gattr

666 karma · joined December 6, 2017

I like graphics algorithms, astronomy, Rust and Linux.
submissionscomments
gattr··on Rust and C++ Interoperability
I use GTK3 with Rust for my video acquisition tool [1] and it's been quite pleasant so far. However, from my testing GTK3 & 4 don't play nice with OpenGL drawing areas, so the next project I'm writing (also in Rust) using Dear ImGUI.

[1] https://github.com/GreatAttractor/vidoxide

gattr··on Some companies find only humans can do the job
Even if they make perfectly human-like, realistically acting sexbots with HW failsafes, there's the question of trusting the SW. It would be inadvisable to use such a black-box proprietary machine which is probably recording and sending detailed (and potentially embarrassing) telemetry. I'd expect a long wait for community-designed, open-source equivalents.
gattr··on Sound
That's not accurate. Only the inner core collapses (hence the "core-collapse supernova"; there are also other types), the rest rebounds, is heated up by core-produced neutrinos, and gets ejected. The Wikipedia article is a good start, also there are plenty of good papers on arxiv (e.g. on still-not-too-successful numerical modeling of the aforementioned "heating", without which the thing simply doesn't go bang).
gattr··on A study of lights at night suggests dictators lie about economic growth
Regarding China, the book "Guns, Germs and Steel" gives the following explanation: due to a lack of major geographic barriers, China became unified under a single rule early, and subsequent irrational decisions by despotic rulers brought stagnation. In contrast, it was impossible to unify Europe by force in pre-industrial age, hence the ongoing competition (and resulting development) between all the states.
gattr··on Rust 1.63
I wrote a video acquisition tool for astrophotography [1] (and I dogfood it). Uses GTK3 for GUI.

[1] https://github.com/GreatAttractor/vidoxide

gattr··on Please put units in names
I myself can't remember seeing Gy in astronomical papers, but I've seen Ga (gigaannum).

https://en.wikipedia.org/wiki/Year#SI_prefix_multipliers

gattr··on Photo captures space station crossing the moon
In a similar vein, a high-res ISS image by Alessandro Bianconi showing a damaged radiator:

https://www.astrobin.com/375799/?nc=all

(Taken with a 14" telescope. Good "astronomical seeing" conditions and necessary post-processing notwithstanding, the smallest resolvable details depend linearly on telescope's aperture (i.e., the primary optical element's diameter).)

EDIT: I also like this animation a lot, ISS crossing the sky (9.25" telescope):

https://astropolis.pl/topic/79691-przelot-iss-z-ogniskowej-2...

gattr··on Learning Standard C++ as a New Language (1999)
Somewhat related: [1]. A bit provocative title, but it's actually about "teaching (the newcomers) C++ constructs first before going through C-era ones".

[1] CppCon 2015: Kate Gregory “Stop Teaching C" (https://www.youtube.com/watch?v=YnWhqhNdYyk)

gattr··on IBM open sources fully-functional Lego microscope design (2020)
On a related note, if one's willing to forego proper mechanics and lighting, for imaging small stuff you only need a digital video camera and a microscope objective lens (or just a photographic lens with some macro rings). I got good results [1] with a machine vision camera from PGR (comparable to RPi camera module) on a tripod pointed at a slide held in a "third hand", with desk lamp shining from behind ("oblique illumination"). Yes, one can easily move it sideways and focus by hand.

[1] https://vimeo.com/user12237688 (technical details in the description)

gattr··on A new wave of Linux applications
FWIW, my smallish project [1] (Rust + GTK3) builds and works on Windows out of the box. I use the MSYS2 build environment.

[1] https://github.com/GreatAttractor/vidoxide

gattr··on Rnote – A note-taking application for drawing tablets, written in Rust and GTK4
In my small project ([1], Rust + GTK3) I pass the program state wrapped in Rc<RefCell> to my update functions (closures-as-event-handlers) and so far it's been OK (after all they're executed sequentially from the main thread only). One just needs to remember not to hold the borrow when displaying a message box (as in GTK it enters a new message loop recursively).

[1] https://github.com/GreatAttractor/vidoxide

gattr··on The mystery of social behavior in octopuses
There is a subplot about intelligence-enhanced cephalopods in Stephen Baxter's SF novel "Manifold: Time".
gattr··on Ask HN: How are your interviewers being rude to you?
Interesting. I haven't seen it here in Europe, but there is such a jar in Mrs. Nguyen's nail salon in the TV series "Better Call Saul" [1]. (Well, I'm not sure about the rose petals.)

https://www.youtube.com/watch?v=OIg9WdWJoME

gattr··on A submarine's weakness: its software?
But if the torpedo has pinged, the sub knows something's afoot, and it could quickly scan in that direction with its own active sonar (giving up your position be damned, we're under attack already) to guide its interceptors. Plus, the attack torpedo is now rushing ahead - and loud.

Sword and shield indeed; it seems the submarine tactics people must have a lot of fun playing with these scenarios.

gattr··on A submarine's weakness: its software?
Sure, but here I imagined you could just home on the attacker's active sonar.
gattr··on A submarine's weakness: its software?
Ah, good point about the structural issue. But as for giving your position away, I meant it to be the last resort, when you're detected and under attack already.
gattr··on A submarine's weakness: its software?
A bit off-topic, but maybe some experts could answer a question?

I've recently re-read Clancy's "Red Storm Rising", the sections on submarine (and anti-) warfare are really interesting (I understand some of it may be simplified/fictional). E.g., how the Mark 48 torpedo can be set to and launched in "hunting mode", where it circles at a slow, undetectable speed, and only after acquiring a target it suddenly accelerates for a kill.

Let's consider this excerpt from [1]:

Terminal Homing is the final stage of the torpedo attack. (...) Terminal homing is an active sonar ping that retransmits on reception becoming more rapid as the range to target closes at maximum speed. (...) The target is alerted to the attack, but there is nothing it can do to defeat the weapon at this point. The weapon is too close and moving too fast to allow time for a countermeasure to be effective.

Now, I might have read too much David Weber ([2]), but wouldn't a small, cheap-ish counter-torpedo suffice? Put 10-20 of them in small automated launchers all around the hull, and let them crash head-on with the (now perfectly detectable) approaching boat-killer, still at a safe distance (which is.. I don't know, 100-200 m?)

[1] https://www.thedrive.com/the-war-zone/33018/modern-submarine...

[2] https://en.wikipedia.org/wiki/Honorverse

gattr··on Hubble finds evidence of persistent water vapor in one hemisphere of Europa
It gets better; one of JWST's uses will be whole-planet monitoring of Mars (which can't be conveniently done by Mars orbiters):

https://www.nasa.gov/feature/how-the-webb-telescope-will-exp...

gattr··on A Closer Look: How I Created a 248MP Photo of the Sun
Ignoring the (rather slow) orbital motion of the Moon, consider: the sky (and the Moon) appears to rotate 360°/24 h. This amounts to 360/(24*3600) = 0.004167 °/s. The apparent size of the lunar disc is about 0.5°, so it takes about 120 s for the Moon to move by its own diameter in the sky. Plenty of time.
gattr··on A Closer Look: How I Created a 248MP Photo of the Sun
In that link it is due to the wavelength used (extreme UV, which shows only active regions as bright, and the prominence layer surrounding the limb.)

However, in many amateur pictures taken in the H-alpha wavelength (like in TFA), the artistic choices come into play, as you said. In the Simon's first image the prominence layer (just outside the limb) is shown as-is (positive), while the disc interior is shown inverted (a negative; note e.g. how the sunspots became white). This is done to get a somewhat more "3D look". In a normal, non-inverted image, the mottles and filaments show up as dark features on a bright background, while inverting may make them look more "natural" (to some) - sometimes downright "casting shadows" (a solar filament often has a brightening around its base - which becomes dark after inversion).

Source: I'm the ImPPG's author (and enjoy solar astrophotography myself).

gattr··on Ask HN: What are some tools / libraries you built yourself?
Back in 2015 I needed a convenient & fast post-processing and image alignment tool for (mainly) astrophotography time lapses, that's how ImPPG was born [1, 2]. (If GIMP had had high-bit-depth support back then, I'd probably try to write a plugin instead.) I still use it, and make small additions every now and then. It's seen some use in the community (probably mainly for solar imaging); GitHub reports a couple thousand downloads for the release that's been up the longest.

[1] https://greatattractor.github.io/imppg/

[2] https://github.com/GreatAttractor/imppg

gattr··on OpenAstroTracker: 3D printed, open source star tracker
A few fellow astrophotographers have built and used them successfully (forum link in Polish):

https://astropolis.pl/topic/71039-monta%C5%BC-wirus-2020/

gattr··on The Ponzi Career
I'll mention the SF novel "Black oceans" [1] again. It describes a scheme where someone extremely driven and confident of success, but utterly poor, can make a deal with certain shady organizations, which - in case you don't make it and repay them in agreed time - will simply harvest you for (very valuable) organs.

[1] https://en.wikipedia.org/wiki/Charne_oceany

gattr··on The Expansion of the Universe
If anyone begins to feel trapped in a cage, please don't just yet. For instance, astronomers currently estimate on the order of 10¹² planets in Milky Way alone, of which up to 11 billion could be Earth-sized and orbiting Sun-like stars [1]. So there's still plenty to explore/colonize, especially if you include the few tens of neighboring galaxies.

[1] https://en.wikipedia.org/wiki/Milky_Way#Contents

gattr··on Australia: Sex consent app proposal sparks backlash
This idea is fully escalated in J. Dukaj's 2001 novel "Black oceans" [1].

> Dukaj extrapolates from the current trend of increasing lawsuits and political correctness: in his world many people willingly live under constant mass surveillance of the New Etiquette (NEti), which registers all their actions so that they couldn't be falsely accused of some "personal offense crime".

That includes people's apartments and them having sex. And of course the NEti records are sealed and secure - theoretically.

[1] https://en.wikipedia.org/wiki/Charne_oceany

gattr··on Speed of Rust vs. C
As for malloc/free, I'm guessing the recommendation is to allow the user to pass their own allocator on library initialization?

Non-checked malloc returns - ouch, I count 12 (out of 56) without a check. Thanks for pointing this out.

gattr··on Speed of Rust vs. C
To practise Rust, I rewrote my small C99 library in it [1]. Performance is more or less the same, I only had to use unchecked array access in one small hot loop (details in README.md). I haven't ported multithreading yet, but I expect Rust's Rayon parallel iterators will likewise be comparable to OpenMP.

[1] https://github.com/GreatAttractor/libskry_r

gattr··on New 10 Terapixel Image of the Night Sky Contains 1B Galaxies
On a similar note [1], there is a few times more trees on Earth (ca. 3 trillion) than there are stars in the Milky Way (100-400 billion).

[1] https://eu.usatoday.com/story/news/2015/09/02/earth-three-tr...

gattr··on OpenBSD on the Lenovo ThinkPad X1 Nano
It's the same for the recent Dell laptops, unfortunately [1].

[1] https://news.ycombinator.com/item?id=25940172

gattr··on S3 standby support removed from BIOS in recent Dell laptops
The Reddit thread suggests making Windows Registry changes to re-enable S3; however, in the latest laptops S3 is no longer even advertised by the BIOS. Just as in my December Inspiron 7506 - I got suspicious when, after putting to sleep, the fan would randomly turn on for a short time, and the laptop would stay warm. After some digging it turned out S3 is not available at all (i.e., under Fedora cat /sys/power/mem_sleep returns only [s2idle], and not deep.)

There are justifications floating around such as "certain devices/Windows drivers don't handle wake-up properly" or "CPU idle states are not re-enabled on wake-up", but still, I would like to have the option of deep sleep mode and just deal with any HW problems at my own risk. The "always connected" sleep functionality is of no importance/use to me at all.

Too bad, as I really like the build & screen quality on this model, and I guess I'll just get used to turning it off (which is not terrible, booting up takes only a few seconds.)

← PreviousPage 6 of 9Next →