HackerLangs
TopNewTrendsCommentsPastAskShowJobs

MathMonkeyMan

no profile record

comments

MathMonkeyMan
·قبل 10 أيام·discuss
I shut my computers all the way down when I'm done with them. I like a clean slate when I return.
MathMonkeyMan
·قبل 13 يومًا·discuss
Is there a difference, though? "You think you know so much because you read a book, but I actually lived it so I really understand it." At best you understand your own experience, and I wouldn't even make that claim about most of my own life. Might learn more about the thing from a book.

Of course, life is about living and you only live once and yadda yadda. Saying AIs don't know something because they weren't really there smells close to androids aren't real because they weren't made by God. That's not to mention that they don't know anything in the vague sense of what we think knowing means.

I don't really have an opinion on the topic, but the framing in the article didn't speak to me. Makes me want to watch the movie again, though.
MathMonkeyMan
·قبل 13 يومًا·discuss
I've always been a stickler for being specific about which regex language your thing accepts, and whether it is to match any substring, or a prefix, or a suffix, or the whole thing, or a line, or a substring of a line, or whatever.

Here are some of the [more popular][1] ones, and then there are PCRE and Python.

It took me a while to learn that some of the older ones you see in e.g. grep are [specified by POSIX][2].

[1]: https://cppreference.com/cpp/regex#Regular_expression_gramma...

[2]: https://pubs.opengroup.org/onlinepubs/009696899/basedefs/xbd...
MathMonkeyMan
·قبل 13 يومًا·discuss
more like over 88.1
MathMonkeyMan
·قبل 14 يومًا·discuss
The median age in America is about 40, so depending on how you define old the majority could go one way or the other.
MathMonkeyMan
·قبل 20 يومًا·discuss
I switched out asio's epoll backend for its io_uring in a database server and CPU utilization shot up. Probably depends on usage and the specifics of how it's integrated into the event code.
MathMonkeyMan
·الشهر الماضي·discuss
Patients don't care about all of that medical mumbo jumbo, they just want to feel well.
MathMonkeyMan
·الشهر الماضي·discuss
Yep, I use this for a @reboot job and a few regular jobs on my home server. I use user crontabs, so I can get around the "unknown shell/path/etc." by prefixing every job with

    /some/shell -l myjob.sh
or sometimes

    . ~/.profile && cd /some/where && ./job >>cron.log 2>&1
MathMonkeyMan
·الشهر الماضي·discuss
I haven't studied history or political science, but I suspect that a bunch of cooperating individual local municipalities can as easily lead to war as to federalism.

The Federalist Papers talk a lot about factionalism versus tyranny. On a larger scale, look at how long it took what are now European Union members to stop warring with each other.
MathMonkeyMan
·قبل شهرين·discuss
I think it might have been a cognitive development thing, but at some point in high school, Stroustrup's "The C++ Programming Language" just kinda clicked for me, like I hadn't been reading it properly before.
MathMonkeyMan
·قبل شهرين·discuss
You got downvoted, but you're correct. Obligatory XKCD: <https://xkcd.com/927/>

Personally I prefer lisp 1 languages, like scheme. Even there, though, there was a split over r6rs, so we got a bunch of mostly-like-r5rs schemes and racket.

Maybe the problem is that lisps are no longer popular enough to have a winning implementation! If there is one, though, then it's Common Lisp on SBCL.
MathMonkeyMan
·قبل شهرين·discuss
Seeing what came later with gauge theories and more speculative stuff like loop quantum gravity, you can't blame Einstein for thinking that the theory of everything might take the form of a set of field equations for a connection. Math was just too hard, and the answer probably doesn't look like that after all.
MathMonkeyMan
·قبل شهرين·discuss
You can do this as a convention in javascript since 2015, but I haven't seen a library that does it:

    > function foo({a, b, c}) {
    ... return {x: a, y: b, z: c};
    ... }
    undefined
    > foo({a: 1, b: 2, c: 3})
    { x: 1, y: 2, z: 3 }
    > const a = 'A', b = 'B', c = 'C';
    undefined
    > foo({a, b, c})
    { x: 'A', y: 'B', z: 'C' }
    >
MathMonkeyMan
·قبل شهرين·discuss
This made me go down a rabbit hole of techniques for separating sodium and chloride from urea/ammonium/ammonia solutions. I wonder if it could ever be made viable when compared to the Haber process for ammonia production.

Also, phosphorus is the more scarce fertilizer, I think. I remember reading a paper from a Chinese lab that was trying to figure out how to cheaply isolate phosphorus fertilizer from commercial pig farm feces. They decided it wouldn't be cost effective.
MathMonkeyMan
·قبل شهرين·discuss
I remember hearing about an interview problem from a while back, and the trick was to use exclusive-or. Now I understand why.
MathMonkeyMan
·قبل شهرين·discuss
Urine can contain too much sodium, and pharmaceuticals.
MathMonkeyMan
·قبل شهرين·discuss
Yes, it's often the randos who feel this way.
MathMonkeyMan
·قبل شهرين·discuss
C++ is a rather old programming language.
MathMonkeyMan
·قبل شهرين·discuss
This is true.

To be fair, if you use only the Linux syscall interface, then a program that you compiled on x86 in the 90s will probably still run anywhere today. Linus is adamant about this.

But if you want to use... anything else, then it's unlikely to work at all unless you are very specific about your target. There isn't one company deciding that glibc or mesa or whatever is binary backward compatible on every kernel for every platform forever. Microsoft is, somewhat, one such company. That's why System32\*.dll have such stable interfaces -- it's their job to translate whatever late 90s system/graphics facilities some boomer dreamed up into whatever the current Windows hodgepodge of system services support. It's no wonder Microsoft is trying to drop support for hardware like crazy.

This implicit compatibility isn't true for all Windows programs, though. Consider Visual Studio. Couldn't compile my console program on my computer and run it on my dad's computer. He had to first install the "Redistributable," which for him and most people might as well be a rootkit and a super scary virus program bad guy.
MathMonkeyMan
·قبل شهرين·discuss
> It is a hilarious and catastrophic failure of Linux userspace that the best API for running games on Linux is Win32

Studios don't target Linux, they target Windows and sometimes Mac.

Imagine if Flappy Bird targeted only iPhone, because there were only 50,000,000 Android users in the world (hardly worth supporting). Then Android creates an iPhone runtime on Android so people can play Flappy Bird on it, and you conclude "iPhone actually worked, this is evidence that Android is a hilarious and catastrophic failure."