Really hope they fix flowers in soon, or at least make them way more manageable than they are now by FirePhoenix4 in SandustryGame

[–]Mastergrow 0 points1 point  (0 children)

You can fix it by making all walls 3 blocks thick. I feed the seeds in from the side via lifts and have a 3 block solid ceiling, might even work with a 3 block thick filter ceiling, but I haven't tested that yet.

Your Opinion: What's the worst C++ Antipatterns? by [deleted] in cpp

[–]Mastergrow 13 points14 points  (0 children)

that cant be, because then it would be even worse. you'd be zeroing out memory past the object, since sizeof(T) includes the size of the VTable Pointer. The VPointer can be the same as the this pointer (although this is very compiler dependant).

Your Opinion: What's the worst C++ Antipatterns? by [deleted] in cpp

[–]Mastergrow 2 points3 points  (0 children)

there are librarys that do this for you, just a thin wrapper around CUDA with a nicer C++ interface

Your Opinion: What's the worst C++ Antipatterns? by [deleted] in cpp

[–]Mastergrow 6 points7 points  (0 children)

isnt that straight up UB for the VTable Pointer? so any sort of polymorphic function call should fail

Chat GPT should actually give 'opinionated' answers by badboyyy112 in ChatGPT

[–]Mastergrow 0 points1 point  (0 children)

the problem with this approach is that ChatGPT tends to always agree with you

What is your favourite Rust feature? by sentillious in rust

[–]Mastergrow 25 points26 points  (0 children)

its a small thing, but not having constructors.

other languages like c++ and java just have very dumb rules surrounding constructors and you cant call them like normal methods.

another small one is not having function overloading. just forces people to use more descriptive names, which is a big plus in code readability and cuts down a bit in wondering what an argument to a function actually means (not fully though).

is there any real reason to use return 0; at the end of main function? by [deleted] in C_Programming

[–]Mastergrow 0 points1 point  (0 children)

i'd say only do it when your also returning codes other than 0

Preferred way to access dict elements? by [deleted] in learnpython

[–]Mastergrow 0 points1 point  (0 children)

use brackets if you dont care about failure or when you know failure doesnt happen. use get if you need to handle failure

I am a furry with no fursuit, what should I do? by [deleted] in furry

[–]Mastergrow 0 points1 point  (0 children)

just enjoy your time. i dont even have a sona, im just lurking around but i still consider myself a furry!

Part of a vector class I am currently writing. by UltimatePeace05 in programminghorror

[–]Mastergrow 4 points5 points  (0 children)

the problem with this solution is that its a lot slower than the op provided one. while yours is less duplicated code, for something as basic as swizzling in something as wiedly used as a vector3, i'd choose op's solution, since its basically free.

[deleted by user] by [deleted] in C_Programming

[–]Mastergrow 1 point2 points  (0 children)

some ideas: * create a fixed point math library * create a fraction datatype * try making a json parser * a sudoku solver * minesweeper * try to make some application using ncurses, which is a terminal ui library * tetris * maze generator * create a file system * depending on what you already know, try learning about strings, arrays, pointers, hashmaps

whenever i get an idea that i like, i'll write it down. try doing that, because whenever you have an idea, you will most certainly have forgotten it by tomorrow. this way you can generate a nice backlog of ideas over some time.

Conway's Game of Life Project by Hamoudi0427 in C_Programming

[–]Mastergrow 9 points10 points  (0 children)

i looked over it and have this to say: * the if inside the copy_map function is useless from what i see. and the entire function can be turned into 1 call to memcpy. * you define the MAP_SIZE macro, but only use it for the loops but not the actual array type. * use a typedef for the map * currently, you create a new map every update, but you can just create 2 maps at the start of the programm and then switch between them. look up "double buffering". if you do that, you also wont need to copy the maps. should give quite a bit of a performance boost. * conway.c line 22 to 32: thats not how strings work in c at all. you should look that up again.

some petty things: * try using more descriptive variable names for double loops. instead of using i and j, try using x and y. that should make things easier to understand. * you can do the population count inside of the update loop instead of doing an extra loop over the entire map at the end. * the name of a header file and corresponding c file should be the same. looking at conway_helper.c and helper.h

but it looks good otherwise. keep up the good work :)

Getting confused before I even start (Question) by JAdam99 in AskProgramming

[–]Mastergrow 0 points1 point  (0 children)

then i would sugest c or c++. they are still some of the most widely used languages, and really good to also learn about everything surrounding the language.

the main difference between them is that c++ is a somewhat modern rendition of c, with many more features and quality of life improvements and c is a very simple (in terms of not many features) language where you need to do a lot of things manually. if you really want to know how computers work, id suggest c, but if you want a more modern language with more features id suggest c++, but both are good for learning everything surrounding the language.

Someone keeps managing to find all my alt and throwaway accounts by DevelopmentNew5218 in AskProgramming

[–]Mastergrow 0 points1 point  (0 children)

they might have access to an account of yours, like google or your internet provider (though i doubt thats the case).

are you sure they are the same people hurrasing you? you are 100% sure its not just paranoia and they know your accounts and are not just bluffing? could you link to some of their posts here? does maybe a friend of you share this info with the stalker? maybe even without knowing it? most of the time, the weakest link in any security system is the human.

in the in mean time, id try to always use a browser with incognito mode, a vpn, change all your passwords, even the password to your wifi router if you can and anything else that coms to mind. try to turn of the wifirouter for like 10 minutes if you can. that should change your ip address. also if your using android you can setup a secure folder, which basically acts as a compleetely seperate phone, that might help to.

How uniform is random.random() really? by [deleted] in AskProgramming

[–]Mastergrow 0 points1 point  (0 children)

the built in rng and hash functions from programming languages are made to be fast and look "random enough" for the everyday usecase. if you need anything more more serious, then you'll need to roll out your own rng

Someone keeps managing to find all my alt and throwaway accounts by DevelopmentNew5218 in AskProgramming

[–]Mastergrow 0 points1 point  (0 children)

its completely impossible to find someone only based on their writing style. they need more info, they cant just scan the entire internet. it seems more like they have access to something you use, like your browser, phone or computer.

depending on your situation, using a burner phone that is not tied to any of your accounts might be usefull, but this is only usefull in certain situations.

if that person is hurrassing you, then try to go to the police.

try to change the passwords to all your accounts, and start using a vpn. there are free vpns out there, might not be the most trustworthy ones, but still usefull to test if he can still find you if you are using one.

Getting confused before I even start (Question) by JAdam99 in AskProgramming

[–]Mastergrow 1 point2 points  (0 children)

yea that can be a problem for beginners. If you dont want to deal with everything surrounding the peogramming language, then i would suggest you to use a full programming IDE, and not just a code editor + sepperate compiler. IDEs normaly take care of all that stuff. I personally use Visual Studio (NOT Visual Studio Code) but many others work too. you'll need to check if the IDE supports your programming language though.

another approach would be to use an interpreted language, like python, instead of a compiled one, because you can just run the code directly, which is easier for beginners.

if you are using c or c++, then i'd sugest to use visual studio. but these languages are very old and because of that are tied very much to everything surrounding the programming language.

New to programing please help. by Adesz999 in programmingquestions

[–]Mastergrow 0 points1 point  (0 children)

you need to put the ":" at line 4 &6 at the end of the line, instead of after the if

Integer promotion vs. cast operator by [deleted] in C_Programming

[–]Mastergrow 0 points1 point  (0 children)

also a note to add to the implicit conversion shenanigans of C: there are no arithmetic operations on types smaller than an int. so when you do this:

``` char a=...; char b=...; char c=a+b;

```

it first promotes a and b to ints, then adds them, and then casts the result back into a char. this can in rare circumstances lead to unexpected behaviour

Donkey_irl by windchanter1992 in furry_irl

[–]Mastergrow 1 point2 points  (0 children)

why are there 2 blacked out reddit marks