[–] 3 points 6 days ago

Yeah. They all use the same text editor library.

KWrite has a very small amount of features (which is still way more than Notepad though). It still has syntax highlighting and stuff. I would recommend it if you are editing stuff like grub/sshd configuration files or reading log files.
Kate has a "Sessions" thingy, unless you are on Debian 12 or older. So when you want to open a directory as a project and save some metadata of your session, this is a good idea. Also, proper LSPs and stuff.

KDevelop is fully meant for programming, using build systems and such. It does require a fair bit of configuration on the first time though. So if you have a CMakeLists.txt in your project, you can use this thing to make your work easier. It works with other build systems too, I just didn't try them out.

  • source
  • parent
  • context
  • [–] 4 points 6 days ago

    Seems like you have the problem of 'having your tools but not knowing how to use them'.

    Perhaps start with something very basic.
    Make a simple interactive program that does +, -, ×, ÷.
    No need for fancy GUI. Let it ask: "What do you want to do? 1. + 2. - 3. × 4. ÷ 5. exit" When the user enters one of the numbers, then you ask for the operands and then you give the result.

    The important part is to do it all by yourself.
    Don't use an IDE. A simple text editor will do. i.e. write all the boilerplate yourself. There is a meaning to it. It only becomes boilerplate because it is the default way to do things.
    No need to use a build system. Just make it in a single file and call the compiler command yourself. Or the interpreter, if it is an interpreted language.

    If it is Python you want to use, don't use PyCharm or what not.
    If you are on Linux, just open a terminal and type python3 (assuming it is installed). If on Windows, use IDLE.

    In case of C++, just write in a normal text editor and the call g++ or mingw.

    Make sure to complete this simple little thing all by yourself.
    After a while you'll see yourself getting ideas, mental pathways unblocking and you being able to convert logic to code.

  • source
  • [–] 3 points 6 days ago (2 children)

    Interesting. I use Kate for the same type of projects.
    Except that web development is something I hardly do, so I just need something simple.
    Similarly, for the occasional Python script or some other language that I rarely use, I go with Kate.

    For markdown, I prefer KWrite.

    I mainly do C and C++ and for those I have KDevelop and Qt Creator.
    For Rust, it would be KDevelop. I haven't looked into whether Qt Creator has any special Rust support.

  • source
  • [–] 5 points 1 week ago

    I was just recently talking about this with a colleague, who in the end, just said "Windows is better".
    Guess now KDE is better. Or has Windows fixed that problem too? (in that case it was kinda sporadic).

  • source
  • [–] 2 points 1 week ago

    Isn't buying pre-baked bread usually more expensive than raw ingredients?

    Anyway, what's more important is that you have enough energy for your everyday life.
    As long as you don't start feeling weak at any time of the day, even lower weight should be pretty fine.

    If your lack of weight is due to heavy physical labour, you can check if glucose powder has a higher calorie count per $ as compared to bread in your area.
    Remember though, glucose powder will mean even lesser essential nutrients, so take the advice of bean people. Dehydrated beans should be cheaper than canned ones. It will take longer to prep for eating though. And simple stuff like ginger, garlic and onion can make the thing way more appetising.

  • source
  •  

    I felt like fixing a thing in qtcreator and tried git clone https://code.qt.io/qt-creator/qt-creator.
    It took over 2 hours to reach 13%. I thought there may be a problem with using https or maybe it was just a network thing, so I tried gi clone git://code.qt.io/qt-creator/qt-creator.git and it turned out to still be as slow.

    While normally opening code.qt.io and using the cgit was pretty snappy, with git, I am getting an average download speed of 10KB/s.

    • Is this how the server is normally configured?
    • Is this only happening with me or do others have the same experience?
    • Did I just get unlucky and try to download during the a maintenance day?

    Similarly, git clone https://code.qt.io/qt-creator/perfparser was also as slow. Although it finished in under 10 minutes because it was a small project.

     

    cross-posted from: https://programming.dev/post/43343171

    I just started checking out auditd and made a rule to log file accesses.

    auditctl -a always,exit -F dir=/path/to/my/directory -F perm=rwa
    

    From the output, I got some things that might be useful:

    • The full path of the executable
    • pid
    • Parent's pid: ppid
    • Process' current working directory cwd

    Now if the process was still running when I check the logs, I could open htop and find out what exactly called the process, from the pid.
    For example, say I run a git pull on a repository and find out that /usr/bin/ssh is accessing some file, I will get something like:

    st
    └ bash
        └ git
            └ ssh
    

    I will get the full executable path of each executable (and know if the executable was not in the system directories, but in some unsafe location writeable by another user). This will give me enough context to go by.

    But using this same example, what happens if I check the logs after the git operation has ended?
    The git process ppid will have been lost(?) and I would have no way to know which process called ssh.

    How do I solve this condition?
    Ideally, I want to have the audit log contain the whole calling tree with the full executable path of each parent.

     

    I just started checking out auditd and made a rule to log file accesses.

    auditctl -a always,exit -F dir=/path/to/my/directory -F perm=rwa
    

    From the output, I got some things that might be useful:

    • The full path of the executable
    • pid
    • Parent's pid: ppid
    • Process' current working directory cwd

    Now if the process was still running when I check the logs, I could open htop and find out what exactly called the process, from the pid.
    For example, say I run a git pull on a repository and find out that /usr/bin/ssh is accessing some file, I will get something like:

    st
    └ bash
        └ git
            └ ssh
    

    I will get the full executable path of each executable (and know if the executable was not in the system directories, but in some unsafe location writeable by another user). This will give me enough context to go by.

    But using this same example, what happens if I check the logs after the git operation has ended?
    The git process ppid will have been lost(?) and I would have no way to know which process called ssh.

    How do I solve this condition?
    Ideally, I want to have the audit log contain the whole calling tree with the full executable path of each parent.

     

    ffmpeg ... -c:a flac -exact_rice_parameters 1 -multi_dim_quant 1 ...

    I was encoding wav to flac.

    • With default options, the result was almost instant
      • At > 500x speed
    • Used -compression_level 12, finished in ~ 7 seconds
      • speed = 48.9x
    • Then I used multi_dim_quant
      • After ~ 10 minutes, I checked the speed to be ~ 0.02x. So thought it would take an hour or so. 1.30 seconds worth of audio was encoded
      • It's been over 2 hours now.
        • Shows 1.46 seconds of audio encoded with current speed = 0.00017x

    Considering running it in a VM, so I can "pause" it whenever I need to restart my computer.

    Update:
    size= 123KiB time=00:00:02.82 bitrate= 356.3kbits/s speed=4.68e-05x
    It stopped trying to use layman notation.
    I'll need to restart soon-ish, but I'll see how far this goes and if the 2.82 seconds of audio is even listenable.

     

    I come from EndeavourOS and when I installed Arch manually, I realised that I had to systemctl enable quite a few services. That included NetworkManager and sddm.

    I was wondering if there exists some PostTransaction hook available that would prompt me about enabling a service/socket after a package installs one?

    So, if I were to do pacman -S extra/bluez-obex, it would later prompt me with:
    Enable obex.service? [g|global] [u|user] [n|no]
    And if I were to answer with anything other than "no"...
    Start now?

    Might be different for system services, but you get the point.

     

    What is the rationale behind GPU heatsink fin design?

    So I have seen a few GPU heatsinks and I wonder why some of them are how they are.

    GPU placement in Cabinet

    The originally intended and most widely used placement for ATX cases at least, is installing right on the PCIe slot, which goes horizontally and with the air incoming from the front of the case.

    gpu_traditional_fit

    Then we have the "vertical" placement using the riser cable, which changes the direction from which the GPU fans take in air, but keep the GPU front, in the same direction, again lining up with the incoming air from the front.

    gpu_trendy_fit

    Finally the very rare vertical placement, which has the front of the GPU rotated towards the top of the case, making it not line up with an airflow incoming from the front.
    This also makes the GPU's ports inaccessible the standard way, giving a reason to the rarity.

    gpu_exotic_fit

    Some examples I found for this

    Here we see that the first 2 placements would make up most of the ATX PC builds with the third one being either for different case styles or for extensively customised builds.

    Fins, fans and airflow

    I would assume that having the air flow along the fins would be better than it crossing the fins at ⦜90°. And even if the air flow due to the case inlet is being ⟂ to the airflow from the GPU fans (in case of front incoming air flowing along the fins), it should still lead to overall increase in air pressure (hence, air density) between the fins.^[Source: Mental simulation] Considering that GPUs tend to have gaps in the IO shield to let the air go out the back, I would assume they (designers of the thermal dissipation solution) want air from the fins to go out the back, which would be better with fins parallel to front incoming air.

    gpu_airflow_illust

    Inference and Doubt

    From the above 2, it would make sense for most GPUs to have their heatsink fins going along their length instead of their width, right?

    Then what's up with the ASRock lineup, with all cards other than the Passive model, the Creator cards (which have the front covered by the shroud anyway, so no incoming airflow) and the watercooled cards (which is not applicable) having the fins ⟂ to front air inlet?
    And of course they are not the only one doing it that way.


    Follow Up

    While discussing in this thread, I realised another point (which I didn't state anywhere in the comments):

    • While it is desirable to have higher air density, it is not desirable to have air increasing in density while in the inter-fin space. Because that would cause the heat released when changing density to be transferred to the fins.
    • Another way to say that is, the air will get hotter, while increasing its density. So, how much this factor matters, will depend upon the initial temperature difference between the air and the fins and how long the dense air stays in the inter-fin space. Oh and also the composition of air.
    view more: next ›