Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)P
Posts
20
Comments
78
Joined
2 mo. ago

  • Gson in the corner murdered:

  • it wasn't funny in any way, but JSHITBOSS "microservice" (it was a jboss service with one microservice inside, in a kubernetes pod, with only one core, tell me about redundancy). Service classes with over 2000 lines of code, it shouldn't even be called spaghetti code, more like lasagna code, the pasta came in layers, separation of concerns was a mere suggestion, code was not thread safe (and it needed to be), but there was only 40 Ejbs for each "stateless" service inside de EAR, so number go up, code goes better.

    I refactored it, it's now in the glorious quarkus 3.27, on virtual threads and java 21, not hyperbole, but 5x more throughput and you don't need 7 phds in italian cousine.

    Edit: I also saw, in Angular, the infamous:

    if (variable === true || variable === 'true' || variable === "true") {

  • Both got killed by the elites of their countries too, if I remember well.

  • Their drivers are SHIT, for wifi there is CNSS, ICNSS, then QMI, all do the same thing, but differently, but NO, it's the same thing, but what does this do??? Is this really a different event or is this just rewritten in that event? Idk still, no one knows.

    Edit: I tried to port the not working kernel drivers for the wifi on the Redmi Note 9s to postmarketos (wifi is not working), didn't work and it's now on LineageOS

  • Yeah, it's a joke, but I disagree on the void, the other languages on the meme doesn't need a return type (when they are returning nothing), java needs it.

  • And the best:

    public static void () {}

    /s

  • I just put a video of a depressed phd student trying to make some money on, like dig, that explains some of the bronze age archeology and history.

    Are you tring to study for some exam or just learning about something?

  • The Gripen is quite interesting, who would have guessed that licensing fighter jets for manufacturing on other countries (Embraer is building them too, Colombia bought some, other countries seem to want it too) would be a good strategy?

    I'll wait 50 years for a Gripen to be sold on Aliexpress for 150 thousand dollars, 250 thousand with replacement parts with a cool paint job.

  • Yeah, I need to kill the witness to that crime.

    Thanks Facebook!

  • Edit: Corrected the integration

    This is a simulation I made for a ball falling (the principles can be used everywhere):

     python
        
    import numpy as np
    import matplotlib.pyplot as plt
    
    
    def calc_acceleration(pos, v):
        return np.array([0, 0, -9.8])
    
    
    def integrate(pos, v, a_old, delta_t):
        pos_new = pos + v * delta_t + 0.5 * a_old * delta_t * delta_t
    
        a_new = calc_acceleration(pos_new, v)
    
        v_new = v + 0.5 * (a_old + a_new) * delta_t
    
        if pos_new[2] < 0.0:
            v_new[2] = -v_new[2]
    
        return pos_new, v_new, a_new
    
    
    # Constants
    delta_t = 0.01
    t_max = 10
    
    # Time evolution
    times: np.ndarray = np.arange(0, t_max, delta_t)
    
    # Initial state
    v = np.array([15.0, -3.0, 15.0])
    pos = np.array([0.0, 0.0, 7.0])
    positions = np.zeros([times.size, 3])
    a_old = calc_acceleration(pos, v)
    
    # Simulating
    for i in range(times.size):
        pos, v, a_old = integrate(pos, v, a_old, delta_t)
        positions[i, :] = pos
    
    # Plotting
    fig = plt.figure()
    ax = fig.add_subplot(projection="3d")
    ax.scatter(positions[:, 0], positions[:, 1], positions[:, 2])
    plt.show()
    
      

    Very simple, you can see a ball falling and getting up again from that starting point, so you just see at least some starting point on how to do this stuff, the basics are not that difficult. But every simulation is like this, just more complicated hahaha.

  • Oh yeah, someone finally asked something about my field.

    So, maybe COMSOL is what you're looking for, but if you want the cool, smooth and amazing stuff of the pros:

    Time to learn numerical calculus, like verlet integration, maybe some calculus for turning potential fields into force (maybe some forward differentiation with dual numbers, just like sympy does hahaha, you can use that too). If it's a hairy equation, that takes some hypergeometric, bessel, etc, scipy has all the special equations.

    I think verlet + sympy for turning the potential fields into the force fields at the particle spots will do amazing, if you don't want paper ready simulations. Like, pos[n, 3], v[n, 3], a[n, 3] (maybe some torque if you want) would be almost all you need.

    For visualization, matplotlib has a lot of stuff, you can make animations and videos.

    If you want to simulate the fields itself, you can use finite differences or finite element methods.

    If you need a lot of performance, I recommend learning Julia or the GODLY Fortran 2008 (fprettify, fortls, gfortran will help to build a modern Fortran program that you can call from python using cdll and ctypes with the ieee c libs for fortran).

  • Well, it can have llms and github integration, i just never used it, but you can use it.

  • Emacs can do anything!

  • This is a VERY good idea, the vscode interface in emacs. Adding all the lsps, lombok (manually), etc, would give the complete power of emacs in a standard and well known form factor. Trying this now, because it's converting time, monday my corworkers will listen to the words of the holy empire of emacs.

  • I use CachyOS on my X220 with btrfs and lzo as disk compression (lzo is very good on old cpus and makes the SSD go really fast). But I think any distro could be good on that hardware.

    As a side note, I would really like an x86_64-v2 distro, people jumped from no additional instructions to v3 in no time, but these thinkpads and older pcs could really shine with that kind of optimization.

  • Don't stress the coffee machine, please, ask it gently "can you please stop ddosing someone on the other side of the planet and make a nice coffee for me?".

    This always work for me.

  • Yeah, it seems its used for passing devices to virtualized environments, but it seems, on these old bulldozer motherboards, the usb devices are virtualized (I have read a long time ago, could be wrong).

  • (Now on my main account)

    Yeah, I used that before, but it used a lot of cpu (Idk why). As I searched for an alternative for my old setup on pulseaudio, I found I could just load pulseaudio modules, so I made this post, because I couldn't find anyone talking about just loading that module, only the werman module with rnnoise.

    The module is still cool though! Thanks for sharing.

  • I had this in KDE (I have Nvidia too...), it was when I was sharing or downloading linux ISOs. If you see this problem when downloading or moving files (like KDE itself freezing, changing volume, but it staying the same, changing brightness, but it actually staying the same), I recommend going after another DE while using nvidia, because I could never figure out why it only freezes on KDE (I changed a lot of things over the years, only KDE gave me this problem).