[-] vi21@lemmy.ml 23 points 1 week ago

wsl --install installs Ubuntu by default. If I had to use WSL, I'd try this first too.

7
submitted 1 week ago by vi21@lemmy.ml to c/rust@lemmy.ml

cross-posted from: https://lemmy.ml/post/51402479

I guess Goish might be hated by many Rust fans and Go fans. Anyway, below is the example taken from its website.

use goish::{go, KB};
use goish::sync::WaitGroup;

#[goish::main]
fn main() {
    let wg = &WaitGroup::new();
    wg.Add(1_000_000);

    for i in 0..1_000_000 {
        // Explicit 2 KiB stack, sub-page allocated from the chunked
        // stackpool - the opt-in for extreme spawn density. Everyday
        // code just writes go!(move || ...) and never sizes a stack.
        go!(stack(2 * KB), move || {
            do_work(i);
            wg.Done();
        });
    }

    wg.Wait();
}
1
submitted 1 week ago by vi21@lemmy.ml to c/golang@lemmy.ml

I guess Goish might be hated by many Rust fans and Go fans. Anyway, below is the example taken from its website.

use goish::{go, KB};
use goish::sync::WaitGroup;

#[goish::main]
fn main() {
    let wg = &WaitGroup::new();
    wg.Add(1_000_000);

    for i in 0..1_000_000 {
        // Explicit 2 KiB stack, sub-page allocated from the chunked
        // stackpool - the opt-in for extreme spawn density. Everyday
        // code just writes go!(move || ...) and never sizes a stack.
        go!(stack(2 * KB), move || {
            do_work(i);
            wg.Done();
        });
    }

    wg.Wait();
}
[-] vi21@lemmy.ml 2 points 3 weeks ago* (last edited 3 weeks ago)

I couldn't find a book that exactly matches Clojure. Still, I prioritize Domain Modeling Made Functional: Tackle Software Complexity with Domain-Driven Design and F# by Scott Wlaschin. However, many concepts, such as algebraic data types, wrapper types, and monads, may need to be adapted or even ignored.

[-] vi21@lemmy.ml 2 points 1 month ago

I haven't applied clean architecture with Clojure, but I'm working on a Python codebase that uses dependency injection intensively. It works, but I personally feel the pain every time I create a mock.

Although the clean architecture book mentioned vertical-slice architecture and added a new chapter about packaging by technical layers versus by features, clean practitioners seem to prefer packaging by layers, which should be approached with caution. I don't remember if the book mentions pushing I/O to the edges, or the imperative shell pattern, which would allow pure functions to cover more logic instead of having a service layer that interleaves I/O and logic.

[-] vi21@lemmy.ml 4 points 1 month ago

The hard part for me was dynamic scope, which I found it was explained nicely in The Common Lisp Condition System: Beyond Exception Handling with Control Flow Mechanisms. Since then I have begun to feel that dynamic scope in Bash is a feature, not limitation.

[-] vi21@lemmy.ml 5 points 5 months ago

Since you are a coder, I suppose you using CLI should be fine. However, there are many other alternatives, which is fast and even based on Arch Linux.

[-] vi21@lemmy.ml 2 points 6 months ago

In the 90s, QBasic (IDE) and Edit didn't work on Slackware. So, I tried Pico, Vim, and Emacs. Now, I still use Emacs.

6
submitted 1 year ago by vi21@lemmy.ml to c/python@lemmy.ml

The default approach involves using TestClient. However, I found that mocking the database, background tasks, etc., is overkill. Do you have any suggestions?

16
submitted 1 year ago by vi21@lemmy.ml to c/rust@lemmy.ml

The Integrity Data Platform (IDP) team decided to rewrite one of our heavy Queries Per Second (QPS) Golang microservices in Rust. It resulted in 70% infrastructure savings at a similar performance, but was not without its pitfalls.

3
submitted 1 year ago by vi21@lemmy.ml to c/lisp@lemmy.ml
3
submitted 1 year ago by vi21@lemmy.ml to c/debian@lemmy.ml

I tested Debian 13 RC1 by installing the Nvidia proprietary driver using:

apt install nvidia-driver

The error from systemctl status dkms is as follows:

× dkms.service - Builds and install new kernel modules through DKMS
     Loaded: loaded (/usr/lib/systemd/system/dkms.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Sun 2025-05-18 07:37:53 +07; 1min 22s ago
 Invocation: da858b6286f04dd6965e54bc964fc78f
       Docs: man:dkms(8)
    Process: 855 ExecStart=/usr/sbin/dkms autoinstall --verbose --kernelver 6.12.27-amd64 (code=exited, status=21)
   Main PID: 855 (code=exited, status=21)
   Mem peak: 6.3M
        CPU: 204ms

May 18 07:37:53 vlegion systemd[1]: Starting dkms.service - Builds and install new kernel modules through DKMS...
May 18 07:37:53 vlegion dkms[1069]: Error! Your kernel headers for kernel 6.12.27-amd64 cannot be found at /lib/modules/6.12.27-amd64/build or /lib/modules/6.12.27-amd64/source.
May 18 07:37:53 vlegion dkms[1069]: Please install the linux-headers-6.12.27-amd64 package or use the --kernelsourcedir option to tell DKMS where it's located.
May 18 07:37:53 vlegion systemd[1]: dkms.service: Main process exited, code=exited, status=21/n/a
May 18 07:37:53 vlegion systemd[1]: dkms.service: Failed with result 'exit-code'.
May 18 07:37:53 vlegion systemd[1]: Failed to start dkms.service - Builds and install new kernel modules through DKMS.

Of course, this problem was fixed by installing 'linux-headers-6.12.27-amd64.'

However, I wonder if 'linux-headers-6.12.27-amd64' should be installed automatically. Is this a bug? How can I check if anyone has reported this already?

[-] vi21@lemmy.ml 4 points 1 year ago

With CachyOS and Mint, it is very easy.

Remark: I disabled secure boot.

6
submitted 2 years ago by vi21@lemmy.ml to c/lisp@lemmy.ml

The advantages of using Common Lisp are numerous:

  1. The shape of tensors is not limited to numbers, but can also include symbols and even S-expressions!
  2. Automatic Generation of Iterators, ShapeError, etc.
  3. Works as a Domain Specific Language for Deep Learning embedded in Common Lisp
51
submitted 2 years ago* (last edited 2 years ago) by vi21@lemmy.ml to c/opensource@lemmy.ml

I wonder whether Sony has ever contributed anything to FreeBSD codebase or the FreeBSD foundation.

[-] vi21@lemmy.ml 5 points 2 years ago

I'm not going to use this name, but it is the most accurate one.

[-] vi21@lemmy.ml 5 points 2 years ago

of the same package on Flathub the main ones i had issues with was Kdenlive, Zoom, and OBS.

It means I probably won't fix bugs.

[-] vi21@lemmy.ml 2 points 2 years ago

I'm not sure what version control implies in this case. Still, we can downgrade version of packages that we installed by Flatpak.

[-] vi21@lemmy.ml 10 points 2 years ago

flatswitch

I love this name.

26
submitted 2 years ago by vi21@lemmy.ml to c/linux@lemmy.ml

I want to a tool for conveniently switch between Kdenlive versions using Flatpak.

6
submitted 4 years ago* (last edited 4 years ago) by vi21@lemmy.ml to c/lisp@lemmy.ml

PicoLisp looks very opinionated to me. It is very interesting for me since it doesn't provide too many choices for beginners.

0
submitted 4 years ago by vi21@lemmy.ml to c/linux@lemmy.ml
view more: next ›

vi21

0 post score
0 comment score
joined 5 years ago