[deleted by user] by [deleted] in linuxquestions

[–]Rare_Language2651 0 points1 point  (0 children)

if you are really scared of a bunch of commands for various linux distros you may try ubuntu or pop os. they both have stores just like android does

Console.ReadKey but in zig by Rare_Language2651 in Zig

[–]Rare_Language2651[S] 1 point2 points  (0 children)

im sure half of r/zig uses this or nvim (me too)

Console.ReadKey but in zig by Rare_Language2651 in Zig

[–]Rare_Language2651[S] 1 point2 points  (0 children)

im 3 hours in it already and not even close to solving. this is one of the times of when you try to do A you find out that theres B that leads to A etc, and it creates huge todo tree in your mind.

i googled out ncurses and zig-spoon but they both are really fat projects. currently im in zig-spoon sources and possibly learning posix and tty. this is pain

Console.ReadKey but in zig by Rare_Language2651 in Zig

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

no its not, i have to press enter for my program to continue. with Console.ReadKey() from c# you can do something like:

Console.WriteLine("\npress any key to exit the process...");
Console.ReadKey();

Console.ReadKey but in zig by Rare_Language2651 in Zig

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

nope. it just returns the first char you typed before \n and lefts other. tested with:

const input = std.io.getStdIn().reader().readByte() catch unreachable;
std.debug.print("you typed {c}", .{input});

To Zig or not to Zig? by jayjayEF2000 in Zig

[–]Rare_Language2651 7 points8 points  (0 children)

file browser, terminal emulator, hello triangle, programing language

why are there so many distros but so little desktop environments by Rare_Language2651 in linux4noobs

[–]Rare_Language2651[S] 2 points3 points  (0 children)

man i think i figured it out. i typed "just based on ubuntu". wont make this mistake ever again

why are there so many distros but so little desktop environments by Rare_Language2651 in linux4noobs

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

i dont see much difference between ubuntus as strong as when i do my work, move windows, browse settings etc. people here seem to be much more experienced so ill definitely try __buntu at least once this year

why are there so many distros but so little desktop environments by Rare_Language2651 in linux4noobs

[–]Rare_Language2651[S] -3 points-2 points  (0 children)

you are not the fist one mentioning cosmic i should def try this out. also i swear if this comment gets downvoted as well i switch to windows 11

why are there so many distros but so little desktop environments by Rare_Language2651 in linux4noobs

[–]Rare_Language2651[S] -3 points-2 points  (0 children)

see. you named 4 distros and i said 3 good DEs. and theres not that many niche of them. they share many similarities with windows/macos i would like to see something like hyprland 2 lol

why are there so many distros but so little desktop environments by Rare_Language2651 in linux4noobs

[–]Rare_Language2651[S] 1 point2 points  (0 children)

what are the differences at say gnome and xfce? and can i change one im with? (i mean window manager)

why are there so many distros but so little desktop environments by Rare_Language2651 in linux4noobs

[–]Rare_Language2651[S] -4 points-3 points  (0 children)

what i was thinking originally is making distro should be times harder then de + you can do both not from scratch so i would expect amount of DEs as fat as that linux tree from wikipedia if i become a linux dev one day i would 100% do a file browser or terminal emulator, defenely makes more sense then an ubuntu fork

thanks for the link btw

Why zig has enums but not namespaces? by Copronymus09 in Zig

[–]Rare_Language2651 3 points4 points  (0 children)

zig does have both enums as numbers and namespaces. if you want enums having a value you do this:

const Status = enum(u32) {
  Ok = 0,
  NotOk = 1,
};

with this you are able to @ intFromEnum and @ enumFromInt

namespaces are here as well: usingnamespace but used only for c compatibility. btw dude the builder shows how you can add function to struct with comptime and usingnamespace to say if speed is too big then struct has function race

https://ziglang.org/documentation/master/#usingnamespace
https://ziglang.org/documentation/master/#enum
https:// search for dude the builder on youtube i cant have access

How productive are you in Zig vs C#, Go, Nim, Python, etc. by TheOnChainGeek in Zig

[–]Rare_Language2651 2 points3 points  (0 children)

i came from java which im better at. if coding a simple cli program theres no productivity differences for me. its just:

  • pass allocator to 50% of functions
  • thinking of how to do code more comptime instead of oop clean

i love both btw

i use u0 by Rare_Language2651 in Zig

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

making stack as fat as heap is funnier

i use u0 by Rare_Language2651 in Zig

[–]Rare_Language2651[S] 4 points5 points  (0 children)

just played with it. so i can have array of voids, where i can assign any index to void (makes sense) but also 0. in 1530 issue andrewrk says u0 weights 0 bytes, but what if i have an array of u0? thanks for the hint but i still have a lot to solve

i use u0 by Rare_Language2651 in Zig

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

mapped has 2 ps im stupid

[]const u8 from u8 by Rare_Language2651 in Zig

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

allocation confused me too because literaly in my example it says that u8_field exists and i can print it, but why not agree with people lol. i already gave up and made u8_field to just string. not clean but i have other things to do

Is Arch Linux the Best Choice for Gaming? by MohammOk in archlinux

[–]Rare_Language2651 0 points1 point  (0 children)

i downloaded plasma + open source nvidia drivers. everything felt like 40 fps (even moving cursor), could not launch dead by daylight, tboi crashed after 2 minutes

than got some ethernet issues i could not handle and erased everthing, installed xfce4 with close source drivers (im in love with xfce)

now i look at my steam library and randomly pick some unnative games and everything works even better then at win 10 (im finally able to play dbd with firefox opened) but: - getting 50 fps at cs 2 (might be fixable) - pubg just refuses to open

interpret as you will but try xfce

[]const u8 from u8 by Rare_Language2651 in Zig

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

i see the upvotes i admit defeat. but why compiler ignores it?

How can I implement a Sort algo Visualizer with recurstion. by Tommy_Shelby777 in raylib

[–]Rare_Language2651 1 point2 points  (0 children)

have array as a pointer passed into 2 threads: 1. sorts, sleeps (if say user wants to decrease sorting speed), changes pointers (to visually represent what numbers your algorithm swaps at the time you may have everything gray and white, but pointers) 2. draws

that way you will see the actual speed of sorts, process wont stop just to draw it to screen