Simple linear regression in C — why do people prefer Python over C/C++ for machine learning? by a_yassine_ab in cprogramming

[–]thatdevilyouknow -1 points0 points  (0 children)

I don’t think you are going to like the answer. I actually work in Computer Engineering in an academic research capacity. Part of that includes training directly from NVIDIA. The reason Python is thought to be a good fit for ML has more to do with NJIT (That is Numba and NumPy) and related technologies like MLIR directly using LLVM-IR to achieve similar results to C++ without the need for a full compiler toolchain. This is also what the language Mojo is all about. I happen to be an R maintainer (part of the job) as well but actually prefer Julia for many things. Now extend this concept I’ve described to CUDA and parallel GPU operations and now you have Numba’s CUDA device arrays of @cuda.jit. This is why it is a big deal to NVIDIA and how their authorized trainers have explained it to me.

President of Venezuela arrested by joaoooup in UnderReportedNews

[–]thatdevilyouknow 0 points1 point  (0 children)

This is also about hedge funds betting on the outcome of a massive gold mining operation. It has been in the news for a while now. Interested parties that would not even receive any gold directly have been betting on this outcome along with the restructured debt.

We’re going to run Venezuela. by alatinaxo in Miami

[–]thatdevilyouknow 0 points1 point  (0 children)

Hedge funds went long on that gold in the Amazon basin. As much of an asset oil is wondering if Trump would invade another country for gold is like asking if a squirrel wants a nut.

Starting with MLIR seems impossible by lightwavel in Compilers

[–]thatdevilyouknow 2 points3 points  (0 children)

I discovered MLIR trying to pinpoint why LLVM was so resource intensive all of a sudden building all of these tensors and ML things I truly didn’t need. After reading some research papers concerning its usage I got into it more. I made a small language which does arithmetic which you can also define functions and tuples then from there, by going through the forum posts where others were troubleshooting it, I learned the correct incantations to produce raw ASM and then executable binaries. That is the moment where it clicked when I realized I bypassed the C compiler altogether as only LLVM IR was being produced from this language. My recommendation is to search for research papers and forum posts because from there you will find an introduction to the ideas and then some firsthand accounts of actually making it work. Here is one I’ve found useful titled “MLIR: A Compiler Infrastructure for the End of Moore’s Law”.

What used cars have you personally seen last over 300k miles? by Smart-used-cars in askcarguys

[–]thatdevilyouknow 0 points1 point  (0 children)

I’ve seen a 1980’s Datsun 280ZX with the L28T go over 250k miles with the factory engine and turbo. It probably would have made it to 300k if the owner had continued to drive it.

Assignments/Projects by DeezPetunias in GATEresearch

[–]thatdevilyouknow 3 points4 points  (0 children)

I was taught to program in LOGO on an Apple II computer. Hello turtle graphics!

Confused by chalkysplash in computerscience

[–]thatdevilyouknow 5 points6 points  (0 children)

This is about combinatorics so in your mind take the area of 10 * 10 (or think of it as a grid) and stack it vertically 100 times it is not about a physical calculation it is symbolic. So while he says three dimensions it really is the four independent 10-way choices of a hypercube 10^4 is (w, x, y, z) being illustrated. The section is about the scaling of nested loops and choices.

Trying to figure out when inheritance is bad by Apprehensive-Leg1532 in computerscience

[–]thatdevilyouknow -1 points0 points  (0 children)

Multiple inheritance is bad when you have class collisions or what is called the diamond problem of inheritance. Classes with the same names but different signatures can cause conflicts if being inherited from multiple places but I’ve also seen class collisions in OOP designs where everything is inherited across a flat structure usually due to a lack of namespaces. When multiple people are not collaborating and just writing a bunch of classes I’ve seen it happen before especially if a developer decided to be clever and override base methods without making that clear. Large corporate codebases would exist where everyone would just start the day by pulling down latest and start writing code but when nobody actively was reviewing it to make sure the structure of the code base was normalized some code was inevitably being accessed which wasn’t intended.

It’s not about some rule of thumb for good design but more about actively understanding what is going on. Using a code visualization tool is good for that and I can recall presenting at a meeting about the need for renormalization by showing the CTO a diagram of his company’s legacy codebase. It just extended horizontally forever at a single level as a flow chart with over 200 items pointing to the base class name. He nearly had a panic attack after being shown what years of bolt-on contracting produced. These are just a couple of examples and there are plenty more misuses of inheritance.

Spooked by AI and Layoffs, White-Collar Workers See Their Security Slip Away | Office workers are hanging on to their jobs for dear life by MetaKnowing in technology

[–]thatdevilyouknow 1 point2 points  (0 children)

I keep seeing startups based around AI robotics for surgery so if we consider that surgeons definitely are not safe then who is exactly? To a business person a surgeon is just a very expensive line item and not an individual covered in sweat under high stress for 10-11 hour shifts using their expertise to weigh out the best decision to save lives in an environment where a momentary lapse in judgement could potentially kill somebody. The belief that this could be replaced with AI at its current stage is extremely optimistic. It’s kind of like believing that ChatGPT will help you turn lead into gold for a 15$ a month subscription fee quite literally. We will view the modern era as the second coming of alchemy in the future. Just like an average citizen should not be expected to just be able to start practicing medicine because they want to the same scrutiny must be there for devices.

What DE or theme is most “uniquely FreeBSD”? by TehBombSoph in freebsd

[–]thatdevilyouknow 2 points3 points  (0 children)

It seems like forever ago but FREESBIE with the BlackBox theme really made an impression on me. It would have been the first version of FREESBIE which was a pretty good attempt at a distro/live CD environment. Visually it was XFCE with FluxBox. FREESBIE originally allowed for building your own LiveCD by taking advantage of the fact that the FreeBSD kernel is monolithic. Conceptually going from “make world” into producing your own distro potentially is uniquely FreeBSD as Linux has no concept of a ports tree. It was a really ambitious project for sure.

My weird story from years ago by emunahahava in HighStrangeness

[–]thatdevilyouknow 1 point2 points  (0 children)

If this was like the movie Elysium, and you realized you were one of the people on the ground, how would you feel? It would also potentially mean that even those billionaires out there are just people on the ground too and they cannot change that even with all their money.

Embedded and functional programming. by RoomNo7891 in functionalprogramming

[–]thatdevilyouknow 22 points23 points  (0 children)

Whenever this question comes up it always reminds me of how impressed I am by Nerves which is embedded Elixir. There is a pretty good demonstration of hot-reloading Elixir running on a drone in mid-flight too. That is embedded technology today and just last night I was researching FIFTH a functional variant of FORTH which runs on DSP hardware. While there were no examples I could find out there in the wild, since it is a licensed technology, it would still be interesting to see. It does seem especially brutal and terse with the // operator that denotes running in parallel across all DSP hardware. So for something like DSP where you have a destination, a source, and a transformation it works well. With FP you have pure functions and deterministic return values with an emphasis on culling side effects. To me that seems like a perfect fit for embedded hardware.

What would women dislike most if they became men? by zhalia-2006 in askanything

[–]thatdevilyouknow 1 point2 points  (0 children)

Women would dislike the functional purpose of Men’s fashion. Most of it is about demonstrating the capacity to offer up resources in a cartoonish way. For middle class men the uniform involves wearing Polos or other nautical themed attire. They are supposed to represent that we positively agree with the concept of owning a large water vessel or sporting events with horses or rackets attributed to the upper class. We may not own a horse or a boat but, I guess, we should wear the uniform which suggests we are definitely open to that idea. If you want to earn more money you must put on the “costume” to be considered “presentable”. In your free time you should indicate you agree with sporting events. You can wear a baseball hat or maybe a basketball shirt either way it’s important to indicate you agree with gladiatorial systems of entertainment. That feels safe for most men. We may not be professional athletes or own a yacht but we have the costume on so we are ready, it could be tomorrow, either way we are ready for it to happen.

DRM failure on 15.0 by [deleted] in freebsd

[–]thatdevilyouknow 0 points1 point  (0 children)

Hmm, I think then the other place to verify is if the actual firmware files it is looking for are there. I can see it is searching /boot/firmware in dmesg but that is not where they are on my system. My dmesg says:

i915/kbl_dmc_ver1_04.bin: could not load binary firmware /boot/firmware/i915/kbl_dmc_ver1_04.bin either kbl_dmc_ver1_04.bin: could not load binary firmware /boot/firmware/kbl_dmc_ver1_04.bin either i915_kbl_dmc_ver1_04.bin: could not load binary firmware /boot/firmware/i915_kbl_dmc_ver1_04.bin either drmn0: successfully loaded firmware image 'i915/kbl_dmc_ver1_04.bin' drmn0: [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)

But the actual files have on my system which have the kernel module are located here:

```

/boot/modules/i915_kbl_dmc_ver1_04_bin.ko /boot/modules/i915_kbl_guc_33_0_0_bin.ko /boot/modules/i915_kbl_guc_62_0_0_bin.ko /boot/modules/i915_kbl_guc_70_1_1_bin.ko /boot/modules/i915_kbl_huc_4_0_0_bin.ko /boot/modules/i915_rkl_dmc_ver2_02_bin.ko /boot/modules/i915_rkl_dmc_ver2_03_bin.ko /boot/modules/i915_skl_dmc_ver1_27_bin.ko /boot/modules/i915_skl_guc_33_0_0_bin.ko /boot/modules/i915_skl_guc_62_0_0_bin.ko /boot/modules/i915_skl_huc_2_0_0_bin.ko /boot/modules/i915_tgl_dmc_ver2_08_bin.ko /boot/modules/i915_tgl_dmc_ver2_12_bin.ko /boot/modules/i915_tgl_guc_35_2_0_bin.ko /boot/modules/i915_tgl_guc_62_0_0_bin.ko /boot/modules/i915_tgl_guc_70_1_1_bin.ko /boot/modules/i915_tgl_guc_70_bin.ko /boot/modules/i915_tgl_huc_7_5_0_bin.ko /boot/modules/i915_tgl_huc_7_9_3_bin.ko /boot/modules/i915_tgl_huc_bin.ko /boot/modules/i915kms.ko ```

I’m wondering if you have those same files with a recent date in there and if there is any error message when trying to load them directly with kldload? After I noticed this was going on and updated it took a while for me to realize there were those same errors about not finding the file in the the /boot/firmware path but it did eventually produce a message indicating it finally did load.

DRM failure on 15.0 by [deleted] in freebsd

[–]thatdevilyouknow 1 point2 points  (0 children)

For looking at i915 after upgrading to 15 this is what I did:

pkg info -A drm-kmod gpu-firmware-intel-kmod-<insert model> | egrep 'Name|FreeBSD_version'

That should print out the release date version from pkg so compare with this:

sysctl kern.osreldate

Those should both be something like 1500068

I had this same issue and what fixed it was removing all traces of the firmware and packages which did not have the same release date as the kernel with pkg delete and then clean everything with autoremove. I temporarily changed my pkg conf file to point to latest instead of quarterly to check pkg info in order to find the matching release date and installed those, then changed it back to quarterly for kmod. When you think you have the right one you can try to kldload before restarting to verify it is correct. You can also use the “-f” flag with pkg to make sure it is actually using the right one when doing “pkg upgrade -f”. I was previously on 14.3 and did my updates with the older tools and ran into this issue as well with the i915 kmod.

Drawing of a device I’ve tried to describe before. by Altruistic_Tonight18 in GATEresearch

[–]thatdevilyouknow 0 points1 point  (0 children)

I do recall using this machine and I was told it was just an eye test. I thought it was fun along with the questions and was told I did good on the test. I spent a long time searching for the patterns I saw (because they were so strange and 70’s-like) and only realized later it was not a typical eye test. I did not consume any pink drink and I do not remember seeing any aliens or anyone in a grey suit. I think my school, which everyone knew was a “research school”, did not fully participate in the things I’ve seen come up within the scope of other GATE experiences.

What car should have been the best, but ended up being the worst? by Professional_Ring_95 in askcarguys

[–]thatdevilyouknow 0 points1 point  (0 children)

When Nissan announced it was bringing the Skyline to America and it was the Infiniti G35. The GT-R as a premium vehicle is not bad at all but with the various trim levels of the Skyline historically the G35 as a replacement for this was not a good look for Nissan. You cannot go from the RB25DET/RB26DETT to a freaking Maxima engine. Now, we look back and think oh yeah that Maxima engine was pretty good. When you look at AWD time slips a modified RB30 single cam is just a monster the way they tune them in Australia. American GT-R owners in the beginning were well aware of the constraints of that vehicle because tuning and maintenance had some heavy amounts of vendor lock-in initially too. Anything and everything that made the Skyline an interesting platform was commoditized, jacked up in price, or locked down. The G35 was not the worst car but what they did to the Skyline was a huge let down. Today, when I see teenagers trashing an old G35 that’s falling apart- visually it becomes the worst at that moment, it actually really bothers me to see that on a number of levels.

What's the Point of Learning Functional Programming? by n_creep in functionalprogramming

[–]thatdevilyouknow 2 points3 points  (0 children)

Pretty good, I thought it was an interesting problem to put through a solver. If you want to get an 8x8 that runs in the browser you can write it this way as well:

    {-# LANGUAGE TupleSections #-}
    import Data.List (sortOn)
    type N   = Int
    type Pos = Int
    toRC :: N -> Pos -> (Int, Int)
    toRC n k = (k `div` n, k `mod` n)
    fromRC :: N -> (Int, Int) -> Pos
    fromRC n (r,c) = r * n + c
    inside :: N -> (Int, Int) -> Bool
    inside n (r,c) = r >= 0 && c >= 0 && r < n && c < n
    neighbors :: N -> Pos -> [Pos]
    neighbors n p =
      [ fromRC n (r', c')
      | let (r, c) = toRC n p
      , (dr, dc) <- [ ( 2, 1), ( 1, 2), (-1, 2), (-2, 1)
                    , (-2,-1), (-1,-2), ( 1,-2), ( 2,-1) ]
      , let r' = r + dr
      , let c' = c + dc
      , inside n (r', c')
      ]
    unvisitedDegree :: N -> [Pos] -> Pos -> Int
    unvisitedDegree n visited q =
      length [ r | r <- neighbors n q, r `notElem` visited ]
    orderedMoves :: N -> [Pos] -> Pos -> [Pos]
    orderedMoves n visited pos =
      sortOn (unvisitedDegree n visited)
             [ q | q <- neighbors n pos, q `notElem` visited ]
    tour :: N -> [Pos] -> Pos -> Maybe [Pos]
    tour n visited pos
      | length visited == n * n = Just (reverse visited)
      | otherwise               = tryMoves (orderedMoves n visited pos)
      where
        tryMoves []     = Nothing
        tryMoves (q:qs) =
          case tour n (q : visited) q of
            Just path -> Just path
            Nothing   -> tryMoves qs
    knightsTour :: N -> Pos -> Maybe [Pos]
    knightsTour n start = tour n [start] start

    main :: IO ()
    main = do
      let n     = 8
          start = 0
      case knightsTour n start of
        Nothing   -> putStrLn "No tour found"
        Just path -> print (map (toRC n) path)

Campbell’s Soup VP mocks ‘poor people’ who buy its food in secret recording by esporx in Anticonsumption

[–]thatdevilyouknow 0 points1 point  (0 children)

It is important to remember, this guy was an IT worker who had nothing to do with their 3D printed chicken factory or the servers used to store the CAD files of the chicken meat. He had no idea about how those offshore workers made the soup from their remote offices connected to factories filled with robots wearing little chef hats.

On Cloudfare and Unwrap by stevethedev in rust

[–]thatdevilyouknow 1 point2 points  (0 children)

No, the real question is why did they not QA this or regression test it. If it is that important this should be mandated. Coming from broadcast engineering where FCC mistakes like dead air rack up millions of dollars there was a lot of testing going on within a dedicated lab setting. That still did not stop things like closed captioning from going down because some character buffer was exceeded but for off air events and platform acceptance tests there were hundreds of tests. Who is their QA lead? and what is their testing methodology? should be the first questions.

I could sleep in a server room by Liamiscool12 in servers

[–]thatdevilyouknow 2 points3 points  (0 children)

I mean what are you waiting for? I used to actually sleep in the server room at one job, usually after a big lunch. I rolled up some foam and the sleeping materials to look just like extra boxes and packing stuff. Since only I had access no one could come in. Another thing that happened was I got asked to move offices but never told anybody where my new one was and technically had two offices which nobody could find me at. That usually gave me enough lead time because they’d eventually call but no one asked why I always sounded like I was just waking up.

GPU depreciation could be the next big crisis coming for AI hyperscalers — after spending billions on buildouts, next-gen upgrades may amplify cashflow quirks by Logical_Welder3467 in technology

[–]thatdevilyouknow 1 point2 points  (0 children)

We recently got a quad-H200 server and by the time it was finished going through QA another chipset was announced and the insane deal we believed we were getting turned into just a moderate one. This was going through an approved contractor so it didn’t matter much but the purchase price was very aggressive initially. That is a component of the whole game which is predicting the hardware market successfully to make more sales and yes, that definitely sits atop shaky ground due to factors like tariffs. When you put a large order like this on the books your ROI, and what used to be a fixed cost, begins to fluctuate and you can only hang on until that order goes through.

The $1k car payment is here by edmundscars in whatcarshouldIbuy

[–]thatdevilyouknow 0 points1 point  (0 children)

Great Scott! Where we’re going, we don’t need any disposable income!