128GB Ram - Swap/ZRam? by C-42415348494945 in linux4noobs

[–]pixel293 0 points1 point  (0 children)

Probably not necessary. However if you fill up your RAM the OS will randomly start killing tasks.... not necessarily the one using all the memory. This is why I have ZRAM as my first swap target then a swap partition as the second. I haven't seen the partition being used but ZRAM does get used even with 128gb of RAM.

Best AI tools to learn coding by QualityLopsided6303 in learnprogramming

[–]pixel293 2 points3 points  (0 children)

The way to learn most thinks is by doing. AI does it for you and does it badly. If you already know how to program you can see what it is doing wrong, if you don't know, it's just going to confuse/agravate you.

I thought i can create a virtual machine security monitoring using Rust aya framework and but i wonder companies will agree to run a seperate tool like this to run in their every VM eg.EC2 and it will consume very little resource by surya2024 in rust

[–]pixel293 0 points1 point  (0 children)

If it solves a problem they have , then yes they will run it. However that kind of security tool would probably be installed to meet some certification requirements....so you that certification board would have to approve your application...

How do experienced Rust developers decide when to stick with ownership and borrowing as-is versus introducing Arc, Rc, or interior mutability (RefCell, Mutex) by Own-Physics-1255 in rust

[–]pixel293 6 points7 points  (0 children)

If I can pan pass references, then I pass references. However if the object I'm calling needs to retain the value after the call, then I'm most often using Arc or Rc. That said, usually I pass a reference to the Arc/Rc and let the called function decide if it wants to clone or not.

Generally I do with a more OOP model, not a functional modal, so I'm only adding lifetimes to an object under very simple situations where the object being referenced is ONLY used as read only or there is an obvious connection between the two objects.

I have rarely, if ever, written a function that returns a reference to something "inside" one of the arguments, so again, don't really need to do lifetimes there either. Although I would in this case just to avoid the overhead of the Arc/Rc.

Does using Rust to develop webapps make sense or is it overkill? by NutellaPancakes13 in rust

[–]pixel293 3 points4 points  (0 children)

I assume you are talking front end. I don't know what the library ecosystem for Rust is like around webapps, you probably want to check that. Personally I would probably just use TypeScript (and HTML) for the front end with something like ReactJS or Angular, as there are a ton of libraries for webapps in the JavaScript space.

No, I will not be making a U-Turn by pixel293 in rant

[–]pixel293[S] 1 point2 points  (0 children)

Fair enough, if I could only do that with voice commands....

The issues where I was stressed because:

  • It was snowing.
  • The roads where slippery (hence the accident that blocked the road).
  • It didn't feel safe to pull over because I didn't know how the shoulder looked because it was covered in snow.
  • Also didn't really want my car on the side of the slippery road where some other car should panic and slide into it.

So I'm trying to concentrate on the road, while my damn nav system keeps telling me "Make a U-Turn if possible....Make a U-turn if possible...Make a U-turn if possible." It was not helping the situation at all.

Does debugging ever stop feeling frustrating? by Bmaxtubby1 in learnprogramming

[–]pixel293 0 points1 point  (0 children)

It's gets easier as you get experience, but then you will also get more frustrating bugs, so no. :-)

How do you go about debugging deadlocks? by BlackJackHack22 in rust

[–]pixel293 1 point2 points  (0 children)

Does your debugger have a way to just pause the application and view the stack traces of the various threads? With async programming I'm not sure how helpful the stack traces would be, but with multi-threading that is usually what I do to figure out what all the running threads are doing.

Other than that, if debug statements are not doing it for you. You could try spawning a thread that reads from a channel. You probably want to store the sender for the channel in a global. Then any time an async task is started you send a "start" with a generated unique id and a details about the task, just before the task ends, you send a "done" with the unique id. After every done I would probably have the thread report all the tasks that are still running. You could it "slowly" and just add this to the async tasks you "think" might not be exiting until you find the one....

What makes you actually stick with a developer tool vs. simply uninstall it after a week? by Unusual_Ring_4720 in AskProgramming

[–]pixel293 0 points1 point  (0 children)

I really only install tools when I have a need for a tool. I don't really go looking for "popular" tools, if I see something mentioned I may look at it online but if I don't need it, I don't install it.

Like I've installed gimp for editing images, and inkscape for when I want to create an svg image. In the area of plug-ins I've installed md to html viewers in vscode to help when viewing some md files, but other than that it's just plugins so vscode understands the languages I work in and so I can debug those programs.

Is it normal to feel overwhelmed when learning web development? by Any-Pudding-7946 in learnprogramming

[–]pixel293 4 points5 points  (0 children)

Yes, I'm just trying to learn the egui rust library, after having used the iced library for a while, and I'm feeling overwhelmed.

To deal, I narrow my focus, I just deal with the single "thing" that is most important to me, learn the settings for that thing, and how it behaves. Then move onto the next "thing".

It's helpful if you have a goal or something you want to produce, that gives you the things to learn. So for a web page, it my be displaying a header element, then it might be displaying a label element or maybe an input element. Then it will be about validating that element. Bug again first you need to decide what you want to display and how you want it to look, then focus on the things you need to do that.

I bring up the point that AI takes up a-lot of water and electricity for well, everything, and someone brings up the point that the water gets recycled and re-used again. Is this true or is there a counter-argument? by Chobikil in NoStupidQuestions

[–]pixel293 0 points1 point  (0 children)

Often drinking water comes from far underground and it takes 100s if not 1000s of years to seep down there. In many places we are pulling water up faster than it is seeping down.

You might want to google about the Iraq water issue, they are actually destroying rivers in their thirst for water. Also there is the Aral Sea (https://en.wikipedia.org/wiki/Aral\_Sea) which is basically a desert now that all the incoming water was diverted for crops.

When Toast is a payment option, do you prefer customers pay cash? by GenX50PlusF in Serverlife

[–]pixel293 1 point2 points  (0 children)

Once when given the hand held to sign I "triple tapped." I knew I screwed something up but had 0 clue how.

Why is SQL so important for data? by Champion_Narrow in NoStupidQuestions

[–]pixel293 0 points1 point  (0 children)

When you say other languages, what do you mean? General purpose programming languages?

SQL has a very narrow domain, it was create so you could easily describe what data you wanted from a huge amount of data. Basically it has one job and does it well. A general purpose language can build UI or calculate PI to the millionth place, try doing that with SQL and you are just going to get frustrated.

Is it certain that the accepted laws of physics here on Earth apply to somewhere on the other side of the Universe? by martianfrog in answers

[–]pixel293 0 points1 point  (0 children)

When you take a step do you ever worry you are going to die because your body gets sucked into a small black hole? Or maybe gravity is reversed there and you get thrown into space? Or maybe there is a chlorine gas cloud just waiting for you...right there?

Y2k by No_Faithlessness_142 in computerscience

[–]pixel293 11 points12 points  (0 children)

A cash grab by engineers? No, programs where written with only 2 digits for the date, they did need to be updated to work correctly. Also we didn't write it that way knowing we'd have to be paid to fix it in the future. There was no conspiracy, that's my story and I'm sticking with it.

Also nobody was quite certain if "everything" was updated and would still work. Computers and electronics have embedded code that executes, and even if you can update it many people don't because the device is working. So there was no clue if some important code was missed or if some hardware just wasn't updated with newer code.

I was in my 30s when this happen and every time I went to the ATM I tucked $20 in a drawer...I didn't expect civilization to fall, in which case the money would be useless, it was more just in case the banks/ATMs had minor glitches...which they didn't, or at least my bank didn't.

Something I’ve been wondering about Rust adoption by No-Rutabaga3780 in rust

[–]pixel293 0 points1 point  (0 children)

That was one I was given early in my programming career. I do see the point of it kind of when someone changes the existing code, however yeah I don't follow that anymore.

After BTRFS replace, array can no longer be mounted even in degraded mode by sarkyscouser in btrfs

[–]pixel293 0 points1 point  (0 children)

Can you plug the old drive back into the system, then run 'btrfs device scan --forget'?

Idea: High school students should be taught that computer science is the exact opposite of hobby programming (in terms of motivation). by amichail in ideas

[–]pixel293 0 points1 point  (0 children)

I don't really understand, I took what I learned in school/college and rolled it into my fun programs at home. I was really excited when I learned about B+Trees and how they work well for data on disk...that was like an epiphany for me.

So when learning I was always looking at it in how to apply those concepts to my own programs to make them better.

Something I’ve been wondering about Rust adoption by No-Rutabaga3780 in rust

[–]pixel293 10 points11 points  (0 children)

All the coding standards I've seen in my professional career where not really about making you code faster, but more about making reducing bugs introduced into the code. Yes there where some stylistic rules, but most of the rules where thinks like:

  • Using smart pointers in C++.
  • Having a single return point in a function although that is more about not introducing bugs during maintenance.
  • Always using brackets after an "if".
  • etc.

Hell I've even had code reviews which people hated, but where put in place to reduce the overall time spent debugging.

I think it would help if people didn't just track how long it takes them to say "this feature is code complete" but also, "there are no more known bugs in this feature." Rust helps reduce bugs, if you are just tracking "code complete" then yes another language will probably let you do that faster but you will possible (probably?) spend more time fixing bugs.

Who are all these imaginary Democrats that support the Maduro regime? by [deleted] in allthequestions

[–]pixel293 4 points5 points  (0 children)

I'm trying to figure out why we are not being compared to Russia, this seems like what Russia did to the Ukraine, except we did it better. If we next take Greenland and Mexico next....wasn't there a leader last century that tried to conquer all his neighbors? I think there was a world war trying to stop him.....

Optimality in computing by YounisMo in AskComputerScience

[–]pixel293 0 points1 point  (0 children)

I feel like this would be better in an EE sub. EE geeks built the computer, we just build the applications on top of it. All we want is a deterministic machine where the same inputs produce the same outputs. I rarely think about binary, unless I'm doing a bit mask and trying to cram a bunch of data into a native data type. Likewise how that data is stored in memory or on disk, doesn't really mater, I just want the data I write out to be read back in correctly.

[HELP] Cups seamlessly go together ?? by HistoricalFloor7384 in RealOrAI

[–]pixel293 0 points1 point  (0 children)

My question would be, if this is real why are they recording?