• 8 Posts
  • 337 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle

  • Womble@lemmy.worldtoProgramming@programming.devSelf-documenting Code
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    5
    ·
    edit-2
    19 days ago

    Good code is not “elegant” code. It’s code that is simple and unsurprising and can be easily understood by a hungover fresh graduate new hire.

    I wouldnt go that far, both elegance are simplicity are important. Sure using obvious and well known language feaures is a plus, but give me three lines that solve the problem as a graph search over 200 lines of object oriented boilerplate any day. Like most things it’s a trade-off, going too far in either direction is bad.










  • Nope, if you’re working on large arrays of data you can get significant speed ups using well optimised BLAS functions that are vectorised (numpy) which beats out simply written c++ operating on each array element in turn. There’s also Numba which uses LLVM to jit compile a subset of python to get compiled performance, though I didnt go to that in this case.

    You could link the BLAS libraries to c++ but its significantly more work than just importing numpy from python.






  • Local models WOULD form the basis of FOSS AI. Supposition on my part but entirely supportable given there is already a open source model movement focus on producing local models and open source software is generally privacy focused.

    Local models ARE inherently private due to the way that no information leaves the device it is processed on.

    I know you dont want to engage with arguments and instead just wail at the latest daemon for internet points, but you can have more than one statement in a sentence without being incoherent.