- 3 Posts
- 44 Comments
sus@programming.devto Programmer Humor@programming.dev•I got to avoid memory management for quite some time7·17 days agoand with a good enough leak, the amount of unused memory will become negative!
Nim is more “high level, automatic memory management by default, but you can go 100% manual if you need to”, though the reality of doing that is basically the opposite of rust’s “everything you need to do is well-documented and solid”
Nim is a compiled language by default, and supposedly cross-compilation is usually as simple as
apt install mingw-w64 nim c -d:mingw myproject.nim
though I haven’t really tried doing it (and my general impression of nim is anything “slightly obscure” like cross-compilation still has a non-zero risk of running into unexpected thorny bugs)
The oxford that says this?
Acronym
- A group of initial letters used as an abbreviation for a name or expression, each letter or part being pronounced separately; an initialism
or the merriam webster that says this?
Some people feel strongly that acronym should only be used for terms like NATO, which is pronounced as a single word, and that initialism should be used if the individual letters are all pronounced distinctly, as with FBI. Our research shows that acronym is commonly used to refer to both types of abbreviations.
sus@programming.devto Privacy@programming.dev•EXPOSING The Billion Dollar SECRET VPN Companies Are Hiding8·1 month agoVideo has general VPN background info:
A VPN is ultimately just someone else’s computer that routes traffic through it, and there is nothing stopping you from starting your own VPN company, promising you’re not logging anything, and then logging everything you can. You are almost certainly never going to be punished in any way for lying to your customers as long as you put in a minimal amount of effort.
Some VPN companies like to make ridiculous claims like “the vpn will prevent you from getting hacked” which is not true
For 95-99% of internet users (at least in western countries) a VPN doesn’t really help with privacy at all since your browser is most likely still easily fingerprintable. UBlock origin or similar things help but are not even close enough to stop all fingerprinting, you need something like tor browser with javascript disabled to actually get your browser privacy to the level where a VPN is relevant. (Though it does have other benefits like circumventing some geoblocking, making unencrypted websites slightly safer, etc)
You ought to manually configure DNS, possibly even try to self-host
touched upon in the video but not directly explained, almost all VPN companies just rent from cloud services instead of hosting it themselves so even if they didn’t personally log anything, all the network traffic is likely actually still being logged by amazon etc
governments and police can just get court orders to get all the data from VPNs, or even force them to start logging if they didn’t already, though this is probably not a problem for you if you’re not considered an exceptionally interesting person
generally trusted VPNs are mullvad, IVPN, ProtonVPN, the only one I’ll personally point out is mullvad who have cohosted servers which should bypass the cloud related issues, though you had to manually select a non-cloud server last time I checked
As for more or less unique info specific to this video, it claims that VPNs lying about not collecting user data is indeed very common and done by ad companies that buy out VPN companies etc, and government spying agencies also operating VPN companies as honeypots
sus@programming.devto Programmer Humor@programming.dev•Coincidentally, FFM peg is also something you can find on the hub6·1 month agoWell eh, the binary seems to be about 130MB while the ffmpeg source repository is only 80MB (and the version with separate .so files (all part of the project as far as I can see) is even larger)
sus@programming.devto Programmer Humor@programming.dev•Something something history is a flat circle4·2 months agobuffer overflows are critical for memory safety since they can cause silent data corruption (bad) and remote code execution (very bad). Compared to those a “clean” unhandled runtime error is far preferable in most cases.
We can avoid expensive branches (gasp) by using some bitwise arithmetic to achieve the so-called “absolute value”, an advanced hacker technique I learnt at Blizzard. Also unlike c, c# is not enlightened enough to understand that my code is perfect so it complains about “not all code paths returning a value”.
private bool IsEven(int number) { number *= 1 - 2*(int)(((uint)number & 2147483648) >> 31); if (number > 1) return IsEven(number - 2); if (number == 0) return true; if (number == 1) return false; throw new Exception(); }
After working at blizzard for 51 years, I finally found an elegant solution by using the power of recursion
private bool IsEven(int number){ if (number > 1) return IsEven(number - 2); if (number == 0) return true; if (number == 1) return false; }
funny how well this fits for both meanings
sus@programming.devto solarpunk memes@slrpnk.net•and they have the fucking gall to call us "parasites"3·3 months agoYeah, same for simcity 4
Yeah, it’s in my edit I realized the same thing. I’m thinking it doesn’t actually really make sense and the real reason is more “the specific way C does it causes a lot of problems so we’re not poking syntax like that with a 10 foot pole” + “it makes writing the parser easier” + maybe a bit of “it makes grepping easier”
So I think it’s still probably unclear to people why “mix of keywords and identifiers” is bad: it means any new keyword could break backwards compatibility because someone could have already named a type the same thing as that new keyword.
This syntax puts type identifiers in the very prominent position of “generic fresh statement after semicolon or newline”
…though I’ve spent like 10 minutes thinking about this and now it’s again not making sense to me. Isn’t the very common plain “already_existing_variable = 5” also causing the same problem? We’d have to go back to cobol style “SET foo = 5” for everything to actually make it not an issue
sus@programming.devto Linux@programming.dev•Occurences of swearing in the Linux kernel source code over time4·3 months agoyep, it’s almost all banana pi, and at least 4 different ‘models’ of it it seems. But the word is also used in some string processing tests and as an example comment of how suffix arrays work…
sus@programming.devto Linux@programming.dev•Occurences of swearing in the Linux kernel source code over time6·3 months agoAnd most of those cases are of course using the word sarcastically
collapsed list of them
The next function to implement is called, amazingly, next(); its job is to move the iterator forward to the next position in the sequence. if (lc->sync == NOSYNC) for (i = lc->header.nr_regions; i < lc->region_count; i++) /* FIXME: amazingly inefficient */ log_set_bit(lc, lc->clean_bits, i); else for (i = lc->header.nr_regions; i < lc->region_count; i++) /* FIXME: amazingly inefficient */ log_clear_bit(lc, lc->clean_bits, i); /* * Amazingly, if ehv_bc_tty_open() returns an error code, the tty layer will * still call this function to close the tty device. So we can't assume that * the tty port has been initialized. */ * this header was blatantly ripped from netfilter_ipv4.h * it's amazing what adding a bunch of 6s can do =8^) /* * I studied different documents and many live PROMs both from 2.30 * family and 3.xx versions. I came to the amazing conclusion: there is * absolutely no way to route interrupts in IIep systems relying on * information which PROM presents. We must hardcode interrupt routing * schematics. And this actually sucks. -- zaitcev 1999/05/12 * corresponding ABS_X and ABS_Y events. This turns the Twiddler into a game * controller with amazing 18 buttons :-) * In an amazing feat of design, the Enhanced Features Register (EFR) * shares the address of the Interrupt Identification Register (IIR). * Access to EFR is switched on by writing a magic value (0xbf) to the * Line Control Register (LCR). Any interrupt firing during this time will * see the EFR where it expects the IIR to be, leading to * "Unexpected interrupt" messages. * Thanks BUGabundo and Malmostoso for your amazing help!
You can still be snobby by instead insisting on “fold, scan, iterate”
It’s a technicality about the pointer type. You can cast the type away which typically doesn’t change the actual value (but I’m pretty sure that causes undefined behavior)
For your example,
int x = 0xDEADBEEF;
signifies the integer -559038737 (at least on x86.)char *p = (char*)0xDEADBEEF;
on the other hand may or may not point to the real memory address 0xDEADBEEF, depending on factors like if the processor is using virtual or real addressing, etc
sus@programming.devto Programming@programming.dev•Everything Started with the Promise of Loosely Coupled Systems4·4 months agoLots of em-dash usage
Service goes down after emitting an event but before persisting internal state—causing partial failures that are hard to roll back.
Subscribe to an existing event and start processing—no changes to publishers.
Helps track a request across multiple services—even through async events.
We once had a refund service consume OrderCancelled events—but due to a config typo, it ignored 15% of messages.
Takeaway: fire-and-forget works—until someone forgets to monitor.
Use it when the domain fits—fan-out use cases, audit logs, or workflows where latency isn’t critical.combined with other chatgpt-isms like the heavy reliance on lists, yeah safe to say it’s mostly AI generated
sus@programming.devto Linux@programming.dev•Installing Linux Doesn't Need to Change. The Experience Does.4·4 months agoit does kinda fit in that if you forced people to learn linux, the basic stuff most people do should in the end not be much more difficult than windows (assuming you don’t run into more bugs)
but that would never happen unless a “linux revolution” was already in full swing
They already have almost all of the discrete gpu market, they’d have to expand to new markets (although they are kind of exploring that already)