News for hackers. Stuff that matters.

dangerbird2

Re:Living Descendants of Mark Anthony on Friday October 21, 2022 @01:36PM (#33290772)
Maybe ridiculous, but not totally unprecedented. Aga Khan IV is generally considered to be royalty despite the fact that his family hasn't held secular power (outside of the occasional governorship) since [1095](https://en.wikipedia.org/wiki/Nizar_ibn_al-Mustansir). Of course, they held religious leadership as Imams of the Nizari branch of Islam.
Re:Fly.io makes infrastructure easy for developers on Friday September 23, 2022 @01:45PM (#32954992)
One possibility is that they have fewer regions than something like AWS, so they can put their data centers somewhere where they get favorable electricity/cooling costs.
Re:The Missing Chinese Machine Revolution on Sunday August 28, 2022 @03:06PM (#32631045)
> If you try to simply cook wheat grains, you will end up with a rather nasty porridge

Maybe nasty to modern eaters, but wheat porridge was a staple in Europe, N. Africa, and the Middle East for thousands of years, especially outside of towns where gristmills were far away and often exorbitantly expensive

https://en.wikipedia.org/wiki/Frumenty

https://en.wikipedia.org/wiki/Harees

Re:First look: adding type annotations to JavaScript on Thursday March 10, 2022 @02:00PM (#30630964)
Did you read the article? All the proposal does is allow the javascript engine to accept typescript-style syntax, while erasing all the annotations at runtime. From the browser's point of view, it would essentially treat the type annotations and type declarations as comments. This combined with native Ecmascript modules means you could theoretically develop a typescript application with no bundler or other build tools. You'd be able able to use typescript autocomplete and linting in your editor, and just serve the files to your browser with a static http server. Some newer bundlers like Vite and esbuild greatly reduce the amount of configuration required to set up a typescript project, but being about to develop a project with nothing but an editor and a browser would be a huge win for small projects.

Since the proposal doesn't care about the semantics of the type annotations, it doesn't even necessitate typescript. It would work just as well with Flow typing or even a completely new type checker.

Re:CXX – safe interop between Rust and C++ on Thursday March 10, 2022 @11:55AM (#30629142)
bindgen[1] already exists to autogenerate a rust API from c headers. It's inherently unsafe because C code is inherently unsafe. In particular, there is no language constructs like destructors or constructors, so you can't naively create a C-based API that can prevent memory/resource leaks and use after free errors. While C++ does have the same issues as C with unsafe pointer semantics, it does have constructors, destructors, and other features that map almost perfectly with Rust's RAII-based resource management, making it pretty easy to generate a safe(ish) rust interface. In practice, it's pretty easy to create a safe rust API from a C library: use bindgen to create the low-level unsafe API, then create rust wrappers using the ad-hoc creation and descruction library functions to implement RAII.

[1] https://rust-lang.github.io/rust-bindgen/

This article is about Australian magpies, which aren't related to European Magpies and other corvids. They're known more for their extreme territoriality than for their intelligence, but OP's article clearly shows they're no dummies either.
But that means it's almost impossible to get heart cancer, so at least we've got that going for us
Re:Django Ninja – Fast Django REST Framework for Building APIs on Saturday February 05, 2022 @01:27PM (#30224059)
DRF was about as good as it got for automatic schema generation and data validation before python static type hints made things like pydantic possible. It also sets up good defaults for stuff like query parameter-based filtering, pagination, and resource relationships (it supports HATOAS by default).
Re:The Curse of NixOS on Monday January 24, 2022 @09:54AM (#30058308)
How does Guix compare to Nix? It seems like by using a scheme-based DSL instead of an ad-hoc configuration language, it solves one of the main complaints the author has about Nix.
They'd fare poorly, but for different reasons. Digital cameras can be vulnerable to IR lasers because their sensors are sensitive to infrared light. Human retinas aren't sensitive to IR, which ironically makes IR lasers more dangerous than visible ones, since they don't trigger the blink reflex which would otherwise limit the damage to the eyes.
Re:Does the Bronze Garbage Collector Make Rust Easier to Use? on Thursday December 23, 2021 @12:36PM (#29664129)
Python does have real threading. The `threading` module provides os-level threads and synchronization primitives. The only difference between this and multithreading in C or Java is that CPython's GIL prevents more than one thread executing bytecode at a time. This prevents parallelism, but not concurrency.

Note this does not mean that python code is thread-safe by default. At most, you can theoretically rely on bytecode operations to be atomic, which means you'll need to synchronize multi-threaded code with mutexes, semaphores and higher-level synchronization constructs.

Re:Stealth bomber in flight on Google Maps on Tuesday December 21, 2021 @03:14PM (#29641551)
Also office scanners. Basically, it's still a 2D image, but instead of two spatial dimensions, it has a spacial dimension and a time dimension.
> once you’ve taken your picture, you need to: 1) remove remaining silver halide that wasn’t exposed to light, 2) “fix” the remaining silver so it’s stable

Isn't that somewhat backwards? The developer converts exposed grains to metalic silver to create a visible image from the latent one, the stop bath neutralizes the developing solution, and finally the fixer dissolves unexposed silver halide.

It's not owned by the bank until you foreclose, after which it's most certainly owned by the bank.

As an aside, how often is it for the manufacturer/dealer to own the bank that issues auto loans. I got mine from Capital One, and I assumed most auto loans outside of the sketchy loanshark used car dealers were issued by the big national banks

Re:Log4jmemes.com: for those of us that need a laugh on Wednesday December 15, 2021 @12:19PM (#29568847)
Fluent-bit/fluentd are written in C and ruby :)
Re:HTTP/3 Is Fast on Wednesday December 15, 2021 @09:13AM (#29566162)
Yeah, one of the major uses of http/3 is that it can gracefully handle connection interruptions and changes, like when you switch from wifi to mobile, without having to wait for the tcp stream to timeout. That's a huge win for both humongous web apps and hackernews' idealized static webpage of text and hyperlinks.
The solar cycle is extremely important for premodern agricultural societies, since it allows predicting growing and harvesting seasons. If you're going by the Julian calendar and the Autumn equinox is falling on September 10, there's probably going to be confusion as to when the harvest should occur. In the case of the Gregorian Calendar, Catholic countries rely on the Spring Equinox to schedule Easter, and when it started occurring well before March 21, this made it increasingly difficult to synchronize the religious and secular calendars.
Re:PDM: A Modern Python Package Manager on Thursday December 09, 2021 @05:27PM (#29503845)
Inspired by Michel Foucault's Pypi and Punish
Re:FerretDB: A truly open-source MongoDB alternative on Wednesday December 08, 2021 @10:30AM (#29485924)
"spaz" is indeed short for "spastic", but it's not typically seen as an ableist slur like it is in the UK. Presumably, the word had been out of use as a term for people with cerebral palsy long enough in the US that it passed through the "Euphemism treadmill"[1], and is no longer associated with actual disability (similar to "imbecile" or "moron").

[1] https://en.wikipedia.org/wiki/Euphemism#Lifespan

Re:Mushroom leather and how it is made (2020) on Monday December 06, 2021 @09:41AM (#29460244)
It depended on the climate and society. Pastoralists living on the steppes almost exclusively lived off animal meat and dairy products, while folks in areas with heavy grain production were much more likely to get the vast majority of their calories from staple grain crops.
Re:Lego has designed a set that can't be taken apart on Friday December 03, 2021 @09:46AM (#29430572)
How about this?

            | singular | plural
    nom     | legum    | legi
    voc     | lege     | legos
    gen     | legi     | legorum
    dat/abl | lego     | legos
Re:WebGPU computations performance in comparison to WebGL on Wednesday December 01, 2021 @08:39PM (#29411492)
WebGPU also works as a simplified alternative to Vulkan or DirectX-12 on native platforms. I could see nodejs libraries using WebGPU compute shaders as an alternative to CUDA kernels that run on non-NVIDIA GPUs.
Re:WebGPU computations performance in comparison to WebGL on Wednesday December 01, 2021 @08:35PM (#29411470)
But as far as a OpenGL replacement on native, it absolutely is.
Re:The Prince symbol has been salvaged from a 1993 floppy disk on Tuesday November 30, 2021 @11:45AM (#29394119)
Also, how are we read Shakespeare in the original Klingon on the internet?
Re:Web4 Should Run on LaTeX on Sunday November 28, 2021 @01:14PM (#29371281)
I had great luck using pandoc instead of raw LaTeX. I'd just write the manuscript body in markdown, and use inline LaTeX for layouts and more complex figures that can't be replicated in Markdown. it also outputs .docx in case the prof wanted Word docs submitted digitally.
Re:Django 4.0 release candidate 1 released on Monday November 22, 2021 @12:26PM (#29309003)
It's less about static checking than it is runtime debugging. When you have a syntax error in a template, Django's error reporting is super opaque about the problem, usually just raising a TemplateSyntaxError with a vague description. This just gives you the python error stack with little information of the actual context of the actual problem in the template itself.

By contrast, if you have a problem in the python code, the exception stacktrace will point you to exactly where the problem originates. If you add a `breakpoint()` call in the source before the exception point and run the request again, you'll get dropped into a live debugging repl

Re:Some notes on using esbuild on Tuesday November 16, 2021 @10:04AM (#29241303)
I love swc, it's close to a drop-in replacement for babel, but with a native executable and doesn't download half of the internet in JavaScript dependencies. You can use your existing build system, but get substantial speedups over using babel.

[1] https://parceljs.org/

Re:Why isn’t British ‘sleaze’ called what it is? on Tuesday November 16, 2021 @09:40AM (#29241011)
It's borrowing the language typically used in the media to describe Middle Eastern ethnic conflicts to a European ethnic conflict. The same way it describes the U.K. as an "Oil Rich Kingdom" (which it is, of course).
IIRC, it is the guys who made it took a a poorly written Half Life fan fiction (possibly written by a 9 year old), brought to life by a gary's mod machinima
Re:Microsoft Goes Deep on Java with JCP Membership on Saturday November 13, 2021 @12:12PM (#29211358)
Azure is Microsoft's cash cow, and probably saved the company after its low point in the 2010s. Basically any tech company that doesn't want to use AWS (i.e. anyone working with retail) or Oracle (i.e. anyone who values their mental health) is going to use Azure for their infrastructure.

Older »