Jump to content

dcgreen2k

Member
  • Posts

    1,941
  • Joined

  • Last visited

Posts posted by dcgreen2k

  1. On 4/12/2024 at 2:40 PM, SpaceGhostC2C said:

    How much of the world's total power consumption is accounted by personal computers, though?

    From https://frontiergroup.org/resources/fact-file-computing-is-using-more-energy-than-ever/

     

    "In 2020, the information and communication technology sector as a whole, including data centers, networks and user devices, consumed about 915 TWh of electricity, or 4-6% of all electricity used in the world."

     

    "Data centers consumed 240-340 terawatt-hours of electricity in 2022..."

     

    "Globally, cryptocurrency mining consumed 110 TWh of electricity in 2022."

     

    That's interesting, but we still don't really know how much of that total is from home computing. Let's see what the US Energy Information Administration has to say about it: https://www.eia.gov/energyexplained/electricity/use-of-electricity.php

     

    Spoiler

    image.png.a83930c877c69fcd8f5206f72444000c.png

    image.thumb.png.6eb4f8f1ad2647415751c1e134789cb9.png

    In the USA, home computers and their related equipment account for only 2.3% of residential energy usage. That's only about 34.5TWh. Heating and cooling take up the most energy usage compared to all other categories by far. So, home computers, at least in the USA, consume a lot less electricity than you might imagine. This makes sense - the average user doesn't have a high-power i7 or an RTX 4090, they're more likely to have an i3 or i5 and a basic graphics card, if not just integrated graphics.

     

    The people who run datacenters don't take energy efficiency lightly either. They have massive electricity bills to manage, so getting the most computing power per watt is going to be a priority.

  2. 1 hour ago, Idkwhattodowithmylife said:

    I don’t know how brims work, but the brim liens don’t even connect so what is the use?

    Brims make the print's first layer extend outward, to increase contact area with the print bed. This might be called something different in the software you're using.

     

    Here's what a brim should look like, shown in blue. I'm using Ultimaker Cura as my slicer.

    Spoiler

    image.thumb.png.3d770a719b370515f3c578381fbf84dd.png

     

  3. 24 minutes ago, Idkwhattodowithmylife said:

    The print fails after the first few layers, so I think the bed is shaking too much from the initial zig zag that the printer does back and forth

    To lay the foundation 

    3D printers are fine with that kind of shaking. It only becomes an issue if you have a large, top-heavy print.

     

    28 minutes ago, Idkwhattodowithmylife said:

    It is printing like the second picture, I think the file just glitched. I am also using brims. I put glue on the bed, but the print just keeps slipping. I think the printer is shaking too much, but I don’t know?

    Using a brim is a good idea. What filament material are you using and what temperature is your print bed set to?

  4. Here's what I see in the file you posted:

     

    Spoiler

    image.png.78054820d6ecb8a29536d20746b61cef.png

     

    Are you printing it like how it's shown in the image? If so, then that's the source of your issues. The main problem is that you have a very large overhang - that's the long horizontal segment. 3D printers can't print out in the air like that without using supports. The second issue is that you have a small portion of the print touching the print bed relative to its size. This means your print is more likely to accidentally come off the print bed.

     

    For the best chance of success, lay your model flat like this:

    Spoiler

    image.png.ccc9e438c7ce30e977fea7d20375f6fb.png

     

  5. 22 minutes ago, deletedname said:

    this one? https://www.qt.io/
    is it still popular in 2024 and for the future ?

    Yes and yes. Qt is very widely used in commercial applications and is my personal favorite library for creating GUIs. Lots of popular programs use it, like Davinci Resolve, VirtualBox, and OBS Studio.

     

    30 minutes ago, deletedname said:

    but i want to learn javascript right now, i think i am able to run it in console / command prompt

    I believe you'd want to look into NodeJS to run JavaScript like that. However, I wouldn't bother with JavaScript unless you want to go into web development.

  6. One of the things I did when I was learning how to program seriously was implement various sorting algorithms. I wrote a program to generate random numbers, strings, etc. and write it to a file, then another program that reads the file and sorts the data in whatever order you choose. It's good practice for learning how to work with data and think about the performance of various algorithms. For example, when I was testing out insertion sort on a large file - maybe 10s of GBs? - my program ran for 8 hours before I shut it down. In contrast, radix sort took only 5 minutes to sort the entire file. However, for smaller sets of data, insertion sort could be faster since radix sort needs lots of overhead to run.

     

    Something in this area that I never got around to, but would be a good exercise, is to make it so that your sorting code can accept ANY data type whose objects can be compared to one another.

     

     

     

  7. Back when my friends and I used to host servers, we used LogMeIn Hamachi. It's free and lets you set up a VPN that you and your friends can connect to, allowing them to connect to your game server. It doesn't require any port forwarding.

     

    A Hamachi VPN is protected with a login, so just give your friend the login info and only they can join it.

  8. A while back I was helping a coworker fix some build errors he was having on a software project we were working on. We eventually got it working, but his method of debugging was to just look on StackOverflow and copy/paste random commands into his terminal until the errors were resolved. He was doing it all so fast that there was NO way he actually read what he was copying. Needless to say, that was... concerning to watch.

     

     

  9. 1 hour ago, silentdragon95 said:

    The hard drive certainly didn't help.

    1 hour ago, podkall said:

    slow texture load could be CPU/RAM or HDD related, not necessairly single-handedly by one, but definitely in combination

    I've been meaning to pop an SSD into that system for a while now, might give me a chance to test how it performs without that old hard drive. 

  10. 19 hours ago, podkall said:

    let's see hardware speed perception, if I asked someone how fast GPU you need for GTAV on Medium settings 1080p, what would be your guess?

    From personal experience, you can run GTAV on mostly Low settings and 1280x1024 resolution at a playable FPS with a C2Q Q6600 and GTX 750Ti. The main issue I had was that textures wouldn't load in if you drove around too fast, but that may have been due to the old hard drive in that system.

     

    I was even able to run it with a C2D E6700, but the missing textures problem was much worse.

  11. 2 minutes ago, wasab said:

    I only know that companies like google, microsoft, apple, ect do not hand out linux computers to their onboarding employees. My company hands everyone a MacBook pro, developer or not, although we engineers do get a special 64 gig ram version because of reasons. 

    I see, that makes sense. 

  12. 17 minutes ago, wasab said:

    Most developers code in macos professionally. i have yet to see one who runs linux on his work computer even if the software being developed is meant to host on Linux machines. 

    That's pretty surprising to me. The majority of the people on my research team use Linux for work, with only a couple on Windows. We don't have any MacOS users.

     

    17 minutes ago, wasab said:

    This means a minimal ui with a none stacking windowing manager is pretty much not a thing for most people, even among developers.

    I totally agree with that. This kind of minimal GUI is definitely uncommon - I only know one person who does this kind of thing and he lives inside NixOS and Emacs. 

  13. 30 minutes ago, Gat Pelsinger said:

    @dcgreen2k

     

    Hmm, I see. But I've seen some people with such a setup that looks like a middle ground between console and GUI. For example this guy - https://www.youtube.com/@TsodingDaily/. When he has a terminal, it is just a terminal. And I cannot see anything related to GUI. But he still manages to run a web browser. And stuff like his taskbar is very customized.

    I found this in one of his videos, is this what you're talking about?

    image.thumb.png.a7fd2edd96d7e1d7fb476f19f708af34.png

     

    It looks like he's just using a window manager to get the super clean look. At the top of the screen, you can see he has GitHub open in a web browser and GNU Emacs as his text editor. A lot of the terminal-based work he does seems to be done through Emacs plugins, although I'm not super familiar with it.

  14. 4 minutes ago, Gat Pelsinger said:

    @dcgreen2k

     

    Yeah but how do I customize that terminal? I guess the first question I should ask is what am I looking for? What do those pro Linux programmers use? The default text terminal or the GUI based terminal emulator?

    I don't think you can customize the default terminal, but you can customize the GUI ones. Everybody uses GUI based terminal emulators because of how much more convenient they are - the functionality is largely the same between the two since they're just bash terminals.

  15. If this is meant to go on your personal machine, I highly recommend keeping the desktop environment. It makes everyday use much easier.

     

    That being said, if you'd like to have Debian boot to a terminal by default, run the command:

    systemctl set-default multi-user.target

     

    To have it boot to the GUI, run this:

    systemctl set-default graphical.target

     

    Alternatively, if you want to switch to a terminal from your desktop, use Ctrl+Alt+F* https://wiki.debian.org/Console. On my system, Ctrl+Alt+F3 brings me to a terminal and Ctrl+Alt+F2 brings me back to the graphical environment.

     

    If you'd like to keep the GUI but have it use less resources, you can install a lightweight desktop environment. Xfce and Lxde seem to be popular for this.

  16. The first time I ever had to take off/reinstall a heatsink was when I upgraded my first gaming PC's CPU to a Core 2 Quad. I forgot to buy thermal paste so I decided I'd just use the stuff that was already on the old CPU. The problem was that this PC was around 10 years old at the time, so the existing thermal paste was completely dried up. Being excited with one of my first major upgrades, I decided to just scrape off the dried crumbles of thermal paste and scatter them on the new CPU, and surprisingly, it worked. It never thermal throttled and could play games all day long.

     

    A few months later, I replaced the dried thermal paste with toothpaste. That also worked great.

  17. I can't say too much about the Windows API, but to answer the question in your title: Yes, libraries written in C++ generally will not work with C code (unless you do things like writing wrappers for the C++ code).

     

    In contrast, most "plain" C code can be used in C++ just fine. There are some C features/syntax that aren't valid in C++ though: https://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B

     

    If you want to learn C++, go ahead. I certainly find C++ nicer to use than C for building larger programs, although there's a lot of added complexity for someone new-ish to programming. It also has a much larger standard library compared to C (hooray, generic data structures). As for the Rust vs. C++ argument, it's really up to you to decide. Rust is newer, popular, and has builtin memory safety while C++ is a lot more mature. C++ is my choice because of how common it is in my fields of interest, but I'll get around to learning Rust too someday.

  18. 8 minutes ago, porina said:

    How useful are tools like those now? Or is code too complex you can't verify your way out of it?

    Memory error checkers are used very often, and UBSan seems to be the most popular currently.

     

    I believe the usefulness of those tools is somewhat tied to how good the project's architecture and testing practices are. If you thoroughly test a module as soon as you write it, it's easy to pinpoint errors and fix them before they propagate to later parts of the project. On the other hand, if you wait to write any tests, have sparse tests, or write spaghetti code, then going through a list of errors, fixing old code, and making sure nothing breaks is going to be a painful process.

×