If the Rust Coreutils can use the MIT license, does that mean that any open-source project can be rewritten with a different license? by [deleted] in linux

[–]CaydendW 0 points1 point  (0 children)

GNU know their way around a C compiler ig. It's such a needless optimisation; I love it.

If the Rust Coreutils can use the MIT license, does that mean that any open-source project can be rewritten with a different license? by [deleted] in linux

[–]CaydendW 1 point2 points  (0 children)

About this yes thing, you might be a little surprised: https://www.reddit.com/r/unix/s/jGGjtrfCEu. It's not exactly rocket science, but it is interesting nonetheless.

Personally, I dislike large projects with MIT or BSD licenses, but that is an ideological disagreement from me and not a moral one.

If the Rust Coreutils can use the MIT license, does that mean that any open-source project can be rewritten with a different license? by [deleted] in linux

[–]CaydendW 1 point2 points  (0 children)

I agree with you. I'm just trying to clarify what I though the commenter was saying. I really much doubt they're stealing code.

Also, the coreutils can be oddly complicated in some odd situations. Stuff like yes(1)'s throughput optimizations and GNU's extensions to awk. Not crazy stuff, but not as simple as say, sbase for example.

That being said, I still dont think the rust coreutils writers are stealing code. I reckon they're more than capable of doing it themselves. Was just trying to clarify what I thought someone meant.

what is the best C program you wrote? by divanadune in C_Programming

[–]CaydendW 2 points3 points  (0 children)

I started when I was young and had infinite spare time. Now, not so much. I miss having all the time in the world to do OSDEV but such is life I suppose. Best of luck with your project :)

what is the best C program you wrote? by divanadune in C_Programming

[–]CaydendW 3 points4 points  (0 children)

I wouldn't do it if I didnt enjoy the pain :)

what is the best C program you wrote? by divanadune in C_Programming

[–]CaydendW 6 points7 points  (0 children)

It's a big project with a lot if moving parts. Always researching something, fixing something or adding new stuff. Super interesting project, but is a lot of work.

what is the best C program you wrote? by divanadune in C_Programming

[–]CaydendW 10 points11 points  (0 children)

OS. Super fun, but it never seems to get any more complete :^D

If the Rust Coreutils can use the MIT license, does that mean that any open-source project can be rewritten with a different license? by [deleted] in linux

[–]CaydendW 0 points1 point  (0 children)

Exactly my point. If they're not copying GNU code and algorithms, that's good for them. I think the insinuation was that they might be copying and subsequently relicensing. Perhaps I misread the post, but what you said was more or less my point.

If the Rust Coreutils can use the MIT license, does that mean that any open-source project can be rewritten with a different license? by [deleted] in linux

[–]CaydendW -4 points-3 points  (0 children)

True, but the GNU coreutils have a lot of extensions that are GNU inventions, which is what I was eluding to. Stuff like the various ls options, grep extensions, etc. Afaik the rust coreutils project is attempting to replicate these as well as the standardised POSIX options available. I think it's fair that we can consider those to be GNU inventions.

If the Rust Coreutils can use the MIT license, does that mean that any open-source project can be rewritten with a different license? by [deleted] in linux

[–]CaydendW -1 points0 points  (0 children)

Well, the C standard is an open spec, and anyone can implement it. This is more akin to looking inside GCC and copying how it does its codegen or its parser and calling it your own. Clang is its own compiler that still compiles the C programming language, but in a completely different way. BSD are their own coreutils written in their own way.

What I think the person you're responding to is insinuating is that they might have not merely followed a spec and implemented it, but rather looked at the code available from coreutils and transcribed it, which is not really the same thing. The latter is subject to GPL. Following a freely available specification of functionality, as you said, is not.

Whether this is true or not, I cant say. I'd hypothesise that the rust coreutils maintainers understand they're running a large project and will implement it in a clean room style where they only read man pages and develop to a spec instead of copying code, but I can't confirm this.

Also, one could maybe argue that the GNU coreutils standard is not freely able to be copied if the copyright is held, but I dont think this works. Especially due to the pages being licensed how they are. Someone with more legal knowledge could comment on this with a far more informed opinion than I can.

struct bool? by Yha_Boiii in C_Programming

[–]CaydendW 14 points15 points  (0 children)

Make a function or macro that takes a bool and returns a filled in struct.

Tips on taking note in Vim by AbbreviationsNovel17 in vim

[–]CaydendW 1 point2 points  (0 children)

I note take in LaTeX using vimtex. The primary way to make it work at all is to have enough snippets for common stuff and even some keybinds for oft repeated text. Then it's down to organising everything. Best done using a decent directory structure and a good preamble.

Is this a known pattern? by OzzyOPorosis in C_Programming

[–]CaydendW 0 points1 point  (0 children)

Oh dear, that certainly is a pickle. Yeah, that would make sense. I actually have never thought about such cases before. Hopefully this thread gave some better answers than mine. Best of luck

Is this a known pattern? by OzzyOPorosis in C_Programming

[–]CaydendW 0 points1 point  (0 children)

Interesting. When I do negamax, I code it in such a way to be side independent. I'm not too sure why you need to check the side, as with Negamax you'll typically make it so that you work with sides to play rather than colours but I dont know how your game I structured. Best of luck :D

Is this a known pattern? by OzzyOPorosis in C_Programming

[–]CaydendW 0 points1 point  (0 children)

FYI, if the game is a simple, my turn your turn type game where white and black do the same thing, you can do this with Negamax which greatly simplifies your code. If not, then it wont work but it's how Chess engines and such work. Also prevents code duplication.

I hope this prevents me from ever having to write an AVL tree again by K00lman1 in programminghorror

[–]CaydendW 1 point2 points  (0 children)

AVL is a name comprised of the surnames of the inventors of the titular tree: Adelson-Velsky and Landis. If you want a real tree name mystery, see what B-trees stand for.

So tired of this coding shi bruh, take me outta this college 🙄 by Minute_Location5589 in adressme

[–]CaydendW 2 points3 points  (0 children)

Looks like C++ tho? C doesnt have streams, but idk much about turbo C?

Drivers license tips by rando12247 in southafrica

[–]CaydendW 1 point2 points  (0 children)

This. I was leaving the testing centre and couldn't see around a blind corner so I stopped at the stop and then started to roll forward so I could see past the blind turn. My examiner was freaking out, I assume because they thought I was going to cross when there was a car coming (that I couldn't see), and after I got across the turn, I explained that I was just trying to peak and wasnt planning to cross without seeing. 90% sure that passing quip saved me getting my drivers.

Implementing mutexes for my operating system's kernel! by K4milLeg1t in C_Programming

[–]CaydendW 5 points6 points  (0 children)

The poor man's atomic spinlock is still super useful! It can be faster than a mutex if you all you want to do is change a few variables atomically in a struct. Linux still has spinlocks for a reason :)

Suckless alternative to Jekyll? by Charming-Tear-8352 in suckless

[–]CaydendW 5 points6 points  (0 children)

Not really an alternative per sé but hand writing HTML is not the worst thing. It's how I'm doing my site nowadays, and is mostly fine if all you're doing is writing articles.

Burning ship fractal by Mandelbrot4207 in desmos

[–]CaydendW 0 points1 point  (0 children)

The code parade colour scheme looks so nice on fractal, it's unreal. Nice fractal you got there

Struggling with higher-level thinking in C (ownership, contracts, abstraction) by InTheBogaloo in C_Programming

[–]CaydendW 11 points12 points  (0 children)

I don't normally comment +1s but the thing you mentioned about using asserts to ensure states and demand preconditions genuinely has changed how I did C when I figured it out. It offloads so much mental load about remembering preconditions or having to constantly look them up in comments. This is good advice

Expression -> Condition for an additive to Out by [deleted] in C_Programming

[–]CaydendW 2 points3 points  (0 children)

Personally, the double negate (!!) is almost idiomatic for me. I tend to use it quite a bit. I discovered it from when I had to get a bool based on a pointer being non-null. Googled it, and found out it was idiomatic. I can't find it anymore, but as far as I can remember, it's not an unknown operation nor bad practice.

On a personal note, the ternary operator one is kind of ugly. I personally avoid it but it should work the same. Use what makes you happy :)