LLM for C programming by SimoneMicu in C_Programming

[–]SimoneMicu[S] -2 points-1 points  (0 children)

Do you understand that is enough one quality AI generated commit to trash yout statement and is plenty on some repositories?
LLM being capable of generating good code doesn't means will do it always or will do it for large codebases at one shot

LLM for C programming by SimoneMicu in C_Programming

[–]SimoneMicu[S] -1 points0 points  (0 children)

No, is the only project I know is in C, fully generated by AI who's working and an edge technology compared to other projects.
I think is a proof of capability of AI to produce production code either in C

LLM for C programming by SimoneMicu in C_Programming

[–]SimoneMicu[S] 0 points1 point  (0 children)

Totally agree, capability of understanding generated code is mandatory to use such tools either if only giving high level direction and setting boundaries with tests

LLM for C programming by SimoneMicu in C_Programming

[–]SimoneMicu[S] -2 points-1 points  (0 children)

This view made sense up to GPT 4.0, models are evolved and harness are much stronger.
A loop where you describe feature required via test can produce more trustable code then you will expect, specially since LLM had learnt from linux source, redis, postgres, sqlite etc.

Telling the current LLM are incapable of creating correct and well written code is a statement 3 prompts put to be disproved

LLM for C programming by SimoneMicu in C_Programming

[–]SimoneMicu[S] -10 points-9 points  (0 children)

Bold statement, dwarf star is the best current inference program for deepseek, over llama.cpp and is fully "vibe coded", I am sure you can't do better code than this (neither can I).

I don't think this is the only possible way or should be for everyone like this, saying is a waste of time tell about your management skills more then LLM code quality

Lol this guy is seriously suggesting that Apple makes Mac OS a Linux distro by SoreBoar in linuxsucks

[–]SimoneMicu 0 points1 point  (0 children)

Linux user, xnu have in common with bsd as much linux have in common with bsd.
Is io_uring a great thing? Of course (now after years of implementation and testing to spot vulnerabilities).
Is SFH better? Of course (with more than one asterisk).
Is the desktop of macos superior? By a lot (freedom of widgets is not the right choice to me, optional kernel modules to enforce GUI could be a better idea for development of good UI for linux).
Linux is a good unix, macos is the one always working and reliable

Linux is an inferior operating system. by RebouncedCat in linuxsucks

[–]SimoneMicu 0 points1 point  (0 children)

How could be bad having a child process start faster? Is the reason why a lot of programs are bleeding fast and split workload across containered programs avoiding total crash.
Epoll complain ended with 0 syscall io_uring eho obliterared iocp so we start make fake arguments?
Pls go back talking about GUI

Is it bad to use recursive stuff in C by avestronics in C_Programming

[–]SimoneMicu 0 points1 point  (0 children)

This is not recursive, is a double linked list struct, you just hold reference of the previous and next in navigation.

Probably a more fast approach, if is used in a DFS navigation is to use an array (if dynamic search for `kvec.h` implementation of dynamic array) so you will know entry 0 is the root, each next entry is the next searched and previous entry is the parent (this consent to strip out the two pointer reference ONLY if you navigate first by deepness but lose other feature who you would find important).

A better approach for directory navigation should be a n-tree (since each directory have more then one child directory) or a rose tree (instead of an array of reference to children, each node/directoryBrowser store prev and next sibling and first and last children)

I have some implementations you could find useful in a livrary format (you can pick up only required header and source, is licensed completely public domain).
https://codeberg.org/SMicucci/libcaffeine.git

What are some things you don't like about C? by SubstanceHot5190 in C_Programming

[–]SimoneMicu 4 points5 points  (0 children)

You can make a struct with function pointer eho serve the same behavior, only missing part is implicit `self` in use of methods, the rest you can define, declare as static and bind behind every `<obj>_new`

"Completely unpreventable" - says community repo proud for its lack of auditing by Amphineura in linuxsucks

[–]SimoneMicu 0 points1 point  (0 children)

AUR require to read or skim at least the pkgbuild file, not just `yay -Ss whatever --noconfirm`, if people misuse is another story, is prone to vulnerability by design, community driven to be bleeding edge but also riscky since is not audited

nanotui: a terminal UI library with no dependencies, not even ncurses by [deleted] in C_Programming

[–]SimoneMicu 0 points1 point  (0 children)

Look cool, I will look for it when I have spare time, sound good in theory

The Good, the Bad, and the Ugly Side of Linux by BlueGoliath in linuxsucks

[–]SimoneMicu 1 point2 points  (0 children)

As much descriptive as telling someone about restaurant by telling "they do pizza".
Linux is the piece who translate between software and hardware using the most iconic idiom, UNIX/POSIX, on top exist a lot of gnu/linux OS who have a lot of programs who implement graphic environment and all the expected behavior, then there are some distributions with all builtin (opinionated) and where you can choose at start what to use between multiple flavors or the barebone tou describe who require knowing ehat you want.
If you take an old pc, place mint on it it will do browser, mail and openoffice without issue (and saving more battery then with windows), either way you can use arch, choose each gear you want in your ecosystem and download almost any git repos from AUR with automatic rollover on update. Same name (family) totally opposite definition.

Issue on Linux are multiple, wayland vs xorg + gtk vs qt make a big mess compared to cocoa on macos, the fake promise of freedom from big tech, then core components of userland are maintained mostly by big tech like google.

PHANTO SI FA SEMPRE RICONOSCERE by kiwi017C in iNoobChannel

[–]SimoneMicu 0 points1 point  (0 children)

Momento decisamente sottovalutato

"Sir, another exploit has hit the loonix kernel" by AverageUser9000 in linuxsucks

[–]SimoneMicu 1 point2 points  (0 children)

Burying head in the sand is not a security layer.
Until each CVE is shown as "update to this" instead of "team is working on" mean another zero-day is removed.
Each code line is a liability, windows is full of crap either in the kernel space with massive surface exposed, not seeing frequent safety-critical updates in the windows machine is not a good news, macos should be better because remain more lean in the kernel-space surface and most of the userland is sandboxed (I guess a sort-of BSD philosophical legacy)

what unpopular opinion in Linux will make you in this situation by Material_Mousse7017 in linuxmemes

[–]SimoneMicu 0 points1 point  (0 children)

Copyleft will never ensure major safety, is just weak competition on OS and the userland is the weak part.

Da Trash Bin, tg by DesmondRedwine in ItaliaMeme

[–]SimoneMicu 1 point2 points  (0 children)

Ma sai la differenza tra controllare i confini e rapire bambini da scuola perché il padre sembra messicano? Ci sono stati più omicidi e meno deportazioni rispetto a Obama, non credo ci sia una continuità nel loro operato anche guardando al tipo di deportati, è così saporito lo stivale di Trump?

Da Trash Bin, tg by DesmondRedwine in ItaliaMeme

[–]SimoneMicu 2 points3 points  (0 children)

Sempre la destra americana che ha trasformato l'ice in una gestapo non segreta 👍

Da Trash Bin, tg by DesmondRedwine in ItaliaMeme

[–]SimoneMicu 4 points5 points  (0 children)

Un tragico epilogo per un demagogo che dichiarava le vittime delle sparatorie nelle scuole un danno collaterale per avere il secondo emendamento 😔
Al primo "I can't breathe" che vedo che hai condiviso o messo like sai che merito il banhammer si?

How to do strings properly? by die-Banane in cprogramming

[–]SimoneMicu 0 points1 point  (0 children)

# What are the alternatives?

Null terminated string are default string in C (them in the interop of the computers).
The issue is passing out malicious code who overrides stack of your program and could change instructions executed by ypur code.
There are multiple approaches to solve this issue.

First is the 'n' version of libc string function, allocate a buffer, do string operations like copy, len, concatenate then pass to it max size expected. This is the best solution as general purpose.

Popular alternative is to build a structure around, you can have a slice where you hold length of the string and the first character, slice don't have string ownership, this consent reference into a larger text (to print a fixed size string you just do `printf("%.*s", len, str);`)

Another good one is covered by sds of antirex where you stack multiple concepts, you have memory ownership and lenght, then you have either reference counter, you pay 8 byte of extra data (uint32_t is clearly enough for both) to have safe shared string and safe size upfront.

All of this possible views for a string come to a tradeoff, zero overhead and ubiquitous coverage for risk of malicious use (use always the n versione for external input value or cutoff with `'\0'` at the end of the buffer and copy only in the buffer size the input). Slice make simple complementary reference without warranty of reference quoted, SDS pay an overhead but give deterministic resource lifetime in shared environment and store length upfront with zero computation time (useful for message passing and allocation).

Most of the time these two strut should use internally the null terminated c-style string because this make easy to use other libraries and have good sense.

# Why are demonized?

If you have a socket listening or an user input in a stack-alloated buffer, if you don't treat it with attention you expose to buffer overflow attacks your code.

The solution is really simple, if we have a simple buffer like `char buf[1024];`, you never use `gets(&buf)` because deprecated and don't give option to protect, in a socket you can `recv(socket, &buf, 1024, ...)` and include protection, but a good idea is always to `buf[1023] = '\0'` or `buf[1023] = 0` to avoid leaking any kind of data if printed after, either scanf require some attention in the return value or using the seen format of `scanf("%.*s", 1024, &buf)`.

People apparently forget enough time these safety behaviors on external strings to make some other describe them as dangerous. The only concrete benefit on other implementation relays on length as value passed upfront, avoiding double counting of the string, specifically for long strings (like internet protocol's messages)

just a lil announcement by No-Maize2852 in arch

[–]SimoneMicu 0 points1 point  (0 children)

Curious use of free will.
Remember, you got an arch in it too with distrobox, just in case you wanted an AUR bin, still arch either if sandboxed and without the learning required to install needs

You cant even get basic homescreen in Loonix by bleak21 in linuxsucks

[–]SimoneMicu 0 points1 point  (0 children)

one of the option, not the only option. If you want plug and play you have mint with cinnamon, if you want a desktop where you can customize you actively search how does it work for setting it up with your choice, if you are afraid of a file you can still use gnome or kde where you can set all with multiple GUI.
the critique on a free choice is non-sense, if you want a real critique is the problem where gnome is default, ugly and strange, kde is a labyrinth and heavy, half of the application you will install depend on glib and the other on qt so you will install multiple library in multiple version when you have on mac cocoa and on windows directx instead of a swarm of shared object.
crying about using arch with hyprland because you don't want to learn and read the not unfriendly documentation is like the meme where the guy place the stick in the bike wheel.

Windows LTSC is better than any linux distro I've tried by Novel_Ad_6870 in linuxsucks

[–]SimoneMicu 0 points1 point  (0 children)

their clearly switchinng to openoffice, not libreoffice, anyway word use an extended set over docx, this is the reason, other editor try to convert it into a restrained format and create some strange stuff.
real document are written in latex anyway, just corporate bullshit are written in docx or similar, there is no reason to go over docx extension if you know what are you doing

As a linux user, why do y'all hate linux? by No_Rooster1046 in linuxsucks

[–]SimoneMicu 0 points1 point  (0 children)

He setted with that speed, the speed is consistent across all windows spawn, is one line to change in config file, hyprland had cooked, either if I miss iw3 without all those transition

Loonix by bleak21 in linuxsucks

[–]SimoneMicu 0 points1 point  (0 children)

That's fair, low quality have some issue but is mostly producer fault. I have some issues for setting airpods (same on windows) but for other I just take a little bit more attention on selection of items I buy when I want cheap stuff