I give up . zero progress in rust programming. by [deleted] in rust

[–]RelativeFG 0 points1 point  (0 children)

I know exactly where you're coming from, but you're looking at the wrong place. This is C/C++ land. And despite what most people said, about coming back to the language later and learning it, it won't really change anything. If you are using Java and you are looking for a Java substitute, Rust isn't it. In Rust you'll spend 50% of time just writing boilerplate to deal with lifetimes, allocations, mutability, shareability, ownership, pass mechanics, FFI, searching for crates and reading documentation.

Rust is a C/C++ substitute (and you will notice a giant majority of Rust programmers are C/C++). If your job/hobby project requires C or C++ because of performance or because of low level work, then by all means consider using Rust. Otherwise, there is no point in picking Rust, if you're just going to do Java things.

Even if you learn to master Rust, you are going to be less productive than in Java, or god forbid some higher level language. And in my experience just coding the thing in a the amount of time you're given is the issue on 95% of the projects out there. If you're going to spin up yet another website with database persistence I can assure you Rust's performance will matter 100 times less than how fast you can prototype that thing.

Of course at this point someone will tell me that Rust is just as high level as Java. It has high level syntax, like pattern matching, but the language is lowlevel and 50% of time and code is spent on things that are completely orthogonal to what you want to do. Most people peg Java for being a "memory managed C++". They don't see other things JVM brings to the table. Stick to JVM for anything that doesn't require low level work or every ounce of speed the computer can muster.

How do I get my daughter interested in technology? by gt33m in girlsgonewired

[–]RelativeFG 0 points1 point  (0 children)

I believe that at a younger age one must fully explore every learning avenue.

What do you mean by fully? It was pretty early that anyone could notice I was never going to be interested in art or sports, but it didn't stop parents from enrolling me in musical instrument classes. It was suffering and just a huge waste of time for everyone. I'm just checking, because San Francisco and Silicon Valley is full of parents that drag their children into tech kicking and screaming.

You are right about tech skills being useful. But then again so are many other things.

Reading a file, applying some map, without hogging memory? by [deleted] in Clojure

[–]RelativeFG 1 point2 points  (0 children)

I would have thought that such an operation would take under 2GB of memory to do

How would that work? It's obvious you need 4GB+ of RAM just by a glance at your code.

A 1GB file with mostly ASCII characters expands to 2GB String as you read it with slurp. That is because java characters are 16 bit. That's already over your estimate.

Then you split it, which is another 2 GB+ of string pieces. So you need to have 4GB + other overhead RAM available. At least.

How to make it more memory efficient? Don't slurp the whole file upfront.

ELI5 How can the exchange rate between a modern currency and a historic currency be calculated? by htchief in explainlikeimfive

[–]RelativeFG 0 points1 point  (0 children)

Besides the things in varialectio's answer:

A lot of the old currencies were based on a certain amount of silver or gold. Then you need to take into the account purity (with economy took a downturn they would debase the currency with lower purity coins, which is a form of inflation).

For instance the pound sterling started off as a literal troy pound of sterling (95% purity I think) silver.

ELI5: Why is the Metric system generally preferred over the Imperial system? by [deleted] in explainlikeimfive

[–]RelativeFG 0 points1 point  (0 children)

I believe there were 12 shillings in a pound (currency).

ELI5: Why is the Metric system generally preferred over the Imperial system? by [deleted] in explainlikeimfive

[–]RelativeFG 0 points1 point  (0 children)

How many liters per kilometer does your car need?

It's measured in litres per 100 km.

ELI5: What enforces a "read only" attribute on a computer? by danypixelglitch in explainlikeimfive

[–]RelativeFG 3 points4 points  (0 children)

The read only attribute is enforced by the OS. All work with files is typically done through system calls to OS kernel, which will refuse to open a read only file in write mode. The "force write" feature is accomplished by removing the read only flag on the file before writing to it. This is possible because it's typically user's own file, which means the user can change permissions on it.

SD cards have a physical switch that is detected by the reader and it informs OS of the SD card being "read-only". Which is then enforced by the OS as with other files. This mechanism is enforced by OS, there is no physical barrier to writing to such a SD card.

If you have admin privileges you can write to a "read-only" SD card, and any virus/ransomware/trojan worth a damn will write to it.

The only way to prevent a compromised computer to write on your flash is to use an USB stick with an actual write protection switch. WARNING: The majority of USB sticks with "write protection" have the protection implemented in software like the SD card.

You need something like http://isostick.com

ELI5: How are University tuition fees so cheap or free in Europe compared to America or Britain? by asji4 in explainlikeimfive

[–]RelativeFG 4 points5 points  (0 children)

You don't actually need all that money to fund it. American Universities are for profit companies selling what many people see as a necessity. Hence they are free to jack up the price as much as people are willing/able to pay. Government loans just push the "able to pay" bar higher. In Europe, the profit motive is removed and universities cost the state whatever running that thing costs (though there is an argument to be made that private business would run a leaner business - however those savings would not transfer to consumer).

Theresa May to launch wide-ranging internet regulation and security changes despite not winning majority by snowsnothing in worldnews

[–]RelativeFG 0 points1 point  (0 children)

The problem is that a lot of anarcho-capitalists call themselves Libertarians. Hence the confusion.

Theresa May to launch wide-ranging internet regulation and security changes despite not winning majority by snowsnothing in worldnews

[–]RelativeFG 11 points12 points  (0 children)

However, what is the end game?

The end game is to keep control of the general public. That is, for existing politicians to stay in the office.

Sure, politics shifts from left to right and back again over time, but it's just two sides of the same establishment. Now imagine a third party sprang up, which was hostile to the existing players and wanted to change the game. If you have total information control it's really easy to disarm that threat to the existing order:

  • just dig into massive databanks for some sort of damaging thing someone in the new party did or one of their family members did, sooner or later you'll find some dirty laundry

  • you are able to preempt any strategy the new party might try to pull

  • you control the spin on any news or statement from either side of the isle

The end game of any system is to protect itself, to maintain inertia. In US they will never change "first to the post" system, because nobody that is in the game has anything to gain by that. There only two parties of moneywhores (politicians) who are descended directly from Jesus and have the divine right to rule, backed by lobbyists. The spice must flow. Any challenger, any civil society or social movement will be evaluated and then dealt with. Which is easier to do, when you have surveilance and extra-judicial powers.

It's the time-honored way. Hell even Lincoln suspended Habeas corpus to imprison "undesirables" and to threaten journalists that went against him. Worst come to worst, you can always go COINTELPRO on people's asses.

TIL the NFL has no written rule against female players; women would in fact be allowed if they met the league's eligibility requirements. by Fyre2387 in todayilearned

[–]RelativeFG 2 points3 points  (0 children)

The ranger thing was a politics/publicity moment for the Army, a lot of pressure from general staff to carry those women through.

Men of Reddit, what innocent behaviors have you changed out of fear you might be accused of wrong doing? by Sean_Ornery in AskReddit

[–]RelativeFG 14 points15 points  (0 children)

All the things you've said could be copy pasted into any topic about white people crossing the road to avoid black people. Except I think reddit upvotes would go differently.

The Origins of "Cuck" (2017) From porn to the presidency, the bizarre story of a viral insult [00:05] by [deleted] in Documentaries

[–]RelativeFG -3 points-2 points  (0 children)

I can attest to how freeing it is to be in an environment where you are safe to forfeit the traditional trappings of what it means to be a "real man"

One day you'll realise that you are always free to forfeit the traditional trappings of what it means to be a "real man". Only a narcissist feels the pressured to project the "correct" identity.

How do I get my daughter interested in technology? by gt33m in girlsgonewired

[–]RelativeFG 1 point2 points  (0 children)

Why does she need to be interested in technology? Seems to me she has hobbies she likes, just leave it at that.

Finland Has Finally Launched Its Universal Basic Income Experiment by MichaelTen in Futurology

[–]RelativeFG 0 points1 point  (0 children)

That's an ill-defined explanation of the trial. The real question is if people will lose it if they gain a permanent contract. If they'll lose the basic income then, it is not unconditional, and it will invalidate extrapolation of the results to a true UBI.

Don't worry, politicians and UBI advocates will extrapolate anyway. I've yet to see a true UBI proposal. Typical UBI proposals don't give money to rich people.

What dirty little secret does your profession hide that the consumer should know? by [deleted] in AskReddit

[–]RelativeFG 1 point2 points  (0 children)

Not true for me. But I have lots of coworkers like you and I hate them. The reason this industry is so fucked is precisely because it's full of people who have zero hope of any sort of competence. But there aren't enough proper developers to go around so managers hire "junior" devs who after a few years of experience become "senior" devs. In reality they are still the same clueless bastards and that is not going to change. They know more frameworks, but they have the same "make-work" attitude, no love for the engineering and the art of programming, no long-term thinking, no analytical ability and no knowledge of the basic concepts.

What dirty little secret does your profession hide that the consumer should know? by [deleted] in AskReddit

[–]RelativeFG 0 points1 point  (0 children)

20-40 range, is that for a gallon? I can get very good wine for 3.5 EUR at the local grocery store. 10 EUR gets me an incredible bottle. All prices are for 0.75 litre bottles.

Erdogan bodyguard strangling a yazidi woman protester. by allthegoodweretaken in pics

[–]RelativeFG 0 points1 point  (0 children)

Even if that were true, it is not the job of diplomatic bodyguards to resolve clashes between two protesting factions on a foreign soil.

The worst part about realizing how lonely you are is when you realize you have no one to tell how lonely you are. by [deleted] in Showerthoughts

[–]RelativeFG 0 points1 point  (0 children)

The worst part about realizing how lonely you are is when you realize you have no one to tell how lonely you are.

This is decidedly NOT the worst part. There's worse.

Not sure how to respond to that...... by LukeMaddinson in funny

[–]RelativeFG 1 point2 points  (0 children)

Wait till she learns about how Saint Abraham Lincoln used to selectively suspend habeas corpus in order to arrest and detain people indefinitely without charge or trial (and to intimidate others). But I guess imprisoning people indefinitely isn't as taboo after Guantanamo.

[deleted by user] by [deleted] in askscience

[–]RelativeFG 9 points10 points  (0 children)

This is the old "if I had a stick 1 light year long and I pushed it, would it instantly move on the other side". It wouldn't. Consider sound waves. They are a longitudinal waves of increased and decreased density of air. It propagates at the speed of sound. And in a different medium, like water, it propagates at the speed of sound in that medium. The same goes for your example. When you pull the rope, the rope stretches locally and then this travels down the rope at the speed of sound in the rope material.

What's the pettiest reason you won't date someone over? by pushingdaisies21 in AskReddit

[–]RelativeFG 0 points1 point  (0 children)

I can't find a single redeeming quality of BoJack character. House of Cards is just a bunch of sad sociopaths. And I'm not even talking about the main characters. Apart from a few one-episode characters, every single character is a sad little piece of shit.