Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror

Comment Re:Android (Score 2) 87

Very fat sarcasm aside, Android is not Linux (aside from a forked, heavily patched, frozen version of the Linux kernel),

Android is (below that stupid UI) very much linux underneath, as any dev who has spent time hacking various android devices can tell you. (and not some social media/stackexchange opinion bot recycling safe pieces of "common wisdom" for likes).

Android is using the same "linux" technologies as any typical desktop, server or embedded implementation of linux (selinux, namespaces, dm-verity, etc).

One inovative feature of Android is that each "app" is running as a separate user, but that simply builds same OS interfaces, just using them in a smarter and unexpected way, as its entire UI shim does. It would be pretty much impossible to "port" Android to another OS than Linux, even some modern Unix OS like MacOS or FreeBSD.

Linux (distros) have always been crap and will continue to be crap for the average Joe

Russian trolls would better leave the average "Joes" alone and go mind their own business

Comment Re:Bad name, they're not actually microsoft (Score 4, Informative) 44

That extension basically lets you to extend C structs like in C++, but allows you to add new members *both* at the start and at the end of the base struct:

struct foo {
    int m;
};
struct bar {
    int before;
    struct foo;
    int after;
};
int main() {
    struct bar b; b.m = 33;
}

Comment Re:There is already a safe subset of C++ (Score 1) 86

All threads and all memory must be allocated are compile time or at initialization time.
[...]
I work in large code bases that do not contain a single "new" or "delete".

Quick question: are you still allowed to call function recursively?

If yes, then all those restrictions are pointless cargo-cult posturing. You could just as well override 'new' and limit how much memory (and where) it could allocate and obtain the same effect.

If not, you should stop using C++. There is no need to learn how to manage all that complexity and expressive power just for writing simple finite state automata.

Comment Re:Transitions (Score 1) 243

Which is unreliable in many situations. I worked on several projects that had issues involving intermittent data loss on a DB9 port, and every time the culprit turned out to be a USB/DB9 adapter.

That's because your "adapter" lacked a MAX232 (or similar) transceiver and was just outputing 0/5v signals on the DB9 pins instead of -12v/+12v. That usually works fine with PC serial ports, not so much with older medical or industrial equipment.

99% of the adapters you can buy off amazon are like that. A proper adapter (no matter what usb-to-serial chip, but including a 5v-to-RS232 tranceiver: everything should cost at most $5) would've worked fine, just like your dedicated RS232 card.

Comment Re:Seriously? (Score 1) 97

int *a = (int *)malloc(sizeof(int));

That's some butt-ugly shit you have there. In C, you should NEVER cast the return value of malloc() [1] and should avoid brittle duplication by using variables instead of their types with sizeof. So:

whatever_type *a = malloc(sizeof *a);

a = b = c; // What a lovely footgun!

That's nothing like it, LOL. You're just assigning pointers (memory addresses) from one variable to another. In C (just like in real life) the address of a house is not a part of the house. Things don't automatically disappear when you stop referring to them.

[1] that *is* an actual footgun; if the headers are messed up and malloc isn't declared, that stupid cast will make sure that the code will compile fine instead of erroring out, creating a crash and potential exploit on any system where sizeof(int) != sizeof(void*).

Comment Re:Seriously? (Score 1) 97

This is no more hidden than C bumping the stack pointer at the end of the scope.

Indeed and if Rust ever becomes as popular as C, its borrow mechanism will have the same fate as the automatic stack in C: something that you cannot use seriously (nobody in his right mind would implement any algorithm by calling functions recursively or use alloca/VLAs/large structs on the stack in C anymore), and which only stays in the way and horribly complicates your life if you're trying to implement any kind of multithreading / non-blocking event handling.

Still very useful for simple programs, though ;-)

Comment Re:Well, I guess M$ was going ... (Score 2) 63

> migrating your upstream Git Repo away from a commercial service like Github takes something like 20 seconds

except for the automatic actions / workflows which you will have to implement yourself with docker/custom virtualization/etc

which is a tedious, time consuming task that I would rather leave to Microsoft and its paid minions ;-)

Comment Re:Seriously? (Score 0) 97

For example in rust, passing a user defined struct as a variable is always a move unless otherwise specified, where in C it's always a copy.

That's utter, abject nonsense. That kind of analyzing C through the lens of the lousy, parasitic concepts that Rust is dealing in is just like how the homeopaths are calling the actual, evidence-based medicine "allopathy".

What would take to change something like
struct { ... } foo; ... func(foo)
in C from a "copy" into a "move" just by changing the "semantics" of the existing operators, but WITHOUT riddling them with extra hidden magic properties?

(leaving aside the fact the struct as function arguments are better avoided in C in the first place, as they're both obtuse and inefficient)

Comment Re:Manifest v3 (Score 2) 28

Have you actually read TFA? Those extensions were using the new (v3) declarativeNetRequest API, not the old webRequest API which is scrapped in v3.

And they don't even need to do that. By their very nature, the addon "permission" are so stupidly designed, that even without that, it's perfectly possible to extrude data (including but not limited to form content, telemetry, etc) from any website an extension is able to run in as a content stript to any other site in the universe.

And just clicking on the extension's popup gives you a transient permission to run content scripts in the current tab without having to declare the site in the manifest, or ask the user for it ;-)

Manifest v3 is needed in order to prevent extensions from messing with google/wtf's data collection and add pushing business. Whether it's a bad or good thing depends on what side you're on.

Comment Re:Add to the power cost of AI (Score 1) 33

No, that would be against the ethos set out by bitcoin and all that "crypto" crap. Just by doing something useless feels subtle and elite, in a way we poor fucks cannot understand.

If whoever the fuck designed that had an eye for actual engineering, that are a thousand way to distribute a ledger (in a way that cannot be subverted by someone NOT controlling the entire internet) than doing pointless calculations.

BTW, surely adding javascript to a webcrawler is hard to impossible, and wasting some cycles (in a horrendously inefficient, ChatGPT-written in python robot running on someone else's hardware as most scraping robots are) is a very high "cost", indeed. You have to suspend your judgement and admire and not ask stupid questions.

Slashdot Top Deals

No extensible language will be universal. -- T. Cheatham

Working...