Better HN
topnewbestaskshowjobs
Log inSign up

GrumpySloth

4,901 karma · joined Sep 13, 2020 (6y ago) · 1,641 submissions

Submissions

comment 3y ago · link · parent

I'd advise going with Wordpress instead, in case Google decides to axe Blogger. If wordpress.com gets axed, you'll be able to migrate your blog to another Wordpress hosting provider with no disruption.

comment 3y ago · link · parent

I mean specifically crashes, which generate those windows with reports with crashdumps sent to Apple.

To be fair, MacOS itself doesn't seem to have issues. There seems to be no upper limit to possible uptime. It's just applications.

comment 3y ago · link · parent

16GB.

comment 3y ago · link · parent

I'm using Mac Mini M1 with Mac OS Monterey.

comment 3y ago · link · parent

I don’t know if it’s the fault of Apple Silicon, but on my Mac applications regularly crash. That includes ACDSee, IINA, qBittorent, Edge, KeePassXC, Sublime Text, Sublime Merge… There is at least one crash every 3 days. Nothing like it happens on my Windows, Linux or FreeBSD systems. It’s my first Mac, so I can’t compare this experience to Intel Macs, and so I don’t know if it’s just that MacOS is so unstable in general, or if those are still pains of migration to a new ISA.

(Often, when one application crashes, a couple others follow not long after.)

comment 3y ago · link · parent

My phrasing was unfortunate. I didn't mean "getting a book published...", rather "buying a book, which was published..."

comment 3y ago · link · parent

As a newbie, I don't know how to enable arithmetic (e.g. #=). gprolog has it enabled by default, so it's easier to get started.

comment 3y ago · link · parent

That may be an option in the US, but in Europe Amazon is often the only option to get a technical paper book published in the US.

comment 3y ago · link · parent

Not just cache, but also the branch mispredictions while walking a trie.

comment 3y ago · link · parent

I'm not talking about dependencies, but about the time spent before main(). It delays startup.

Another thing is that local static variables often compile to fairly horrific long code with branches. Better just move it to a wider scope or a longer-lived struct/class member somewhere.

comment 3y ago · link · parent

static would move the construction to before main(). In big projects that becomes an issue, when you have tons of little static objects defined here and there.

comment 3y ago · link · parent

Which languages have parser frameworks in their standard libraries?

comment 3y ago · link · parent

- Affinity Photo

- DTrace (surprisingly on Windows)

comment 3y ago · link · parent

Which of them understand what gn and cgn are supposed to do?

comment 3y ago · link · parent

Islam is not a race.

comment 3y ago · link · parent

Those things are no less incredible to me than GitHub. (Also not used at the companies I’ve worked for so far.)

comment 3y ago · link · parent

I think the trend comes from services, like YouTube, enabling captions by default. I almost always disable them, because they’re distracting. However, sometimes I can’t be bothered. I suspect many people can’t be bothered even more often.

I enable captions sometimes for single words, which I failed to hear right, although usually in those instances captions show something completely nonsensical.

comment 3y ago · link · parent

None of that screams workers rights, nor welfare of the common people. Quite the contrary. If Marx was living in the XXI-st century, he’d be writing about Chinese instead of English factories. In fact the lack of workers rights makes it more reminiscent of theoretical capitalism than anything in the West.

comment 3y ago · link · parent

It always amazes me how many companies host their source code in “the cloud” visible to external companies, accessible from the public internet, only a single bug/security vulnerability/human error away from being leaked. The companies I’ve worked for so far host their source code on their own servers, which are physically under their control, and aren’t accessible from the public internet. Add on top of it that functionally GitHub/GitLab don’t hold a candle to code review functionality of Gerrit, project management of Redmine/Jira; and the only explanation is that those companies really, really don’t want to hire 1/2 sysadmins to manage their infrastructure.

comment 3y ago · link · parent

China is a capitalist country.

comment 3y ago · link · parent

On Linux one of my favourite tools to display metrics about a process in real time, such as cpu/memory/io utilisation, which can also be broken down per thread (with friendly thread names displayed if your application sets them), is pidstat from the sysstat package.

comment 3y ago · link · parent

That depends on what you mean. SML has "polymorphism" boiling down to being able to plug an arbitrary type in some places, which is denoted like 'a. But when people talk about generics, they more often talk about C++ templates, Java generics, Rust traits, etc. whose SML equivalent are signatures, structs and functors. Signatures are a bit like Rust traits, structs are a bit like Rust implementations of traits, whereas functors are like Rust's "templates", i.e. wherever you swap angle brackets to parametrise something with types constrained by traits, or values constrained by types. Except in Rust this parametrisation can be slapped on a bunch of things. It can be on structs, on functions, on traits, on implementations of traits etc. In SML you need to group all the "parametrised" things into a struct (and a corresponding signature), which is going to be returned by a functor.

And now the thing is: with transparent signature ascriptions, functors are monomorphised in SML, instead of everything being hidden behind signatures (as is in the case of Rust with traits when you use dyn), which has semantic consequences. E.g. a struct returned by a functor may contain a type. You can't perform proper type-checking without monomorphising, because you don't know what the exact type is. E.g. in the following program, the final line couldn't be type-checked without monomorphisation:

   signature ITERABLE = sig
       type ElemT
       type SrcT
   
       val new_iter: SrcT -> unit -> ElemT option
   end
   
   signature LIST_ELEM_TYPE = sig
       type T
   end
   
   functor ListIterFun (ListElemType: LIST_ELEM_TYPE): ITERABLE = struct
       type ElemT = ListElemType.T
       type SrcT = ElemT list
   
       fun new_iter l = let val lr = ref l
                        in
                          fn () => case !lr of
                                     nil => NONE
                                   | (x::xs) => (lr := xs; SOME x)
                        end
   
   end
   
   structure IntElemType: LIST_ELEM_TYPE = struct
       type T = int
   end
   
   structure IntListIter = ListIterFun(IntElemType)
   
   val next = IntListIter.new_iter [1, 2, 3, 4, 5]
If I change the signature ascription on ListIterFun to an opaque ascription (:> ITERABLE), the final line won't type-check, because it's not obvious from the signature, that ElemT is int. So transparent signature ascriptions require monomorphisation (Rust traits without dyn), and opaque signature ascriptions free the compiler from having to do monomorphisation (Rust traits with dyn*).

There was a lot of discussion of this issue when Go was settling on a design for its generics, under the phrase "reified generics".

comment 3y ago · link · parent

> The researchers induced cardiac arrest in pigs and left the dead bodies at room temperature for an hour before infusing their blood with OrganEx, which contains amino acids, vitamins, metabolites, and 13 additional compounds. Using a machine, they circulated the mix for six hours and noticed signs of revival in the dying organs—heart cells began beating, liver cells absorbed glucose from blood, and DNA repair resumed.

To me it doesn't sound that the pig was cut into pieces. It reads to me that everything was left in place.

comment 3y ago · link · parent

Yup. I consider runtime reflection an antifeature, which has negative performance effects, is unsafe (see e.g. log4j) and leads to fragile code.

I would however welcome static reflection with open arms. In Rust in particular, I’d prefer it if derive was implemented using static reflection, rather than proc macros.

comment 3y ago · link · parent

> There is nothing 'real world surveilance' about following this link:

There is about how you know which link to follow.

comment 3y ago · link · parent

That’s not what I’m asking though. I’m asking how they know which jet is Musk’s.

comment 3y ago · link · parent

A bit of a tangent: where does the knowledge about which jet is Musk's (in this case N628TS) come from? Are ownership records of jets public information? Isn't that a privacy issue? Imagine if that was the case for cars. It's pretty much a given that governments can track both, but just a random person being able to do that is even worse IMO.

comment 3y ago · link · parent

Yeah, I don’t get it why people speak about it in past tense. It’s still a great service, it still has great content (better than any other TBH) and you’re not the product — it’s a service you pay for, and there are no ads.

comment 3y ago · link · parent

After a couple seconds on GNU's homepage[1]:

> With proprietary software, there is always some entity, the developer or “owner” of the program, that controls the program—and through it, exercises power over its users. A nonfree program is a yoke, an instrument of unjust power.

[2]:

> To release a nonfree program is always ethically tainted

I've read enough of passages like these from GNU in the past to say that your quote is not a mischaracterisation.

[1]: <https://www.gnu.org/philosophy/free-software-even-more-impor...>

[2]: <https://www.gnu.org/licenses/gpl-faq.html>

1
202122
55