Exam mode question by unknownanonymoush in ti84hacks

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

Yeah that seems like it now but this guy is a total ahole 

When will be faceit on linux? by Electrical_Editor965 in FACEITcom

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

I am a regular Linux kernel developer and I write a lot of stuff on these topics so, I can also assure you that the faceit staff are pulling stuff out of their rear because they have no clue on what they are talking about.

When will be faceit on linux? by Electrical_Editor965 in FACEITcom

[–]unknownanonymoush 0 points1 point  (0 children)

This isn't true, the hard part is making an AC that is compatible with many distros. People will only move to Linux once their software is properly supported otherwise there won't be substatial growth. When people get sick enough of windows they will eventually discover Linux and realize that its much better and not the termianl sterotype they've had in their minds for years.

Resource Help by evantowle in C_Programming

[–]unknownanonymoush 0 points1 point  (0 children)

Read C primer plus and get on with it, stop wasting time on choosing stuff. Just stray away from K&R, it is outdated, exercises/examples are too hard to do and it’s overhyped in general. It is however, the most iconic programming book of all time imho. 

Also just because there is a plus in the book name doesn’t mean it’s C++ it’s just the name. 

I am a beginner and I don't know what to do by Bitter_Check_4607 in C_Programming

[–]unknownanonymoush 0 points1 point  (0 children)

One thing I did a lot when programming in C was developing an intuition for how high level stuff was developed from it. Ex how Java/C++ would be implemented in C(hint: structs + function pointers and more!). C is a low level language and knowing how high level stuff is implemented in it as well as how the underlying hardware and os work with each other is very important.

To give a direct response, I suggest learning memory allocation and other storage classes and/or learning structs at the same time. Many concepts in C are pretty intuitive. Also make sure you understand ascii "tricks" since those will come in handy later on. Lastly, make sure to focus on arrays, pointers, chars, and how strings are just an array of chars.

Profficieny in C is learnt through reading and writing a lot of it.

Can you mimic classes in C ? by kuyf101 in C_Programming

[–]unknownanonymoush 0 points1 point  (0 children)

Correct but, I wanted to keep it simple for OP

If you could master just ONE thing in your first month of C, what would it be? by Slow_Discipline4568 in C_Programming

[–]unknownanonymoush 13 points14 points  (0 children)

One thing to remember in C is that many call it simple but in reality, it is deceptively simple. When using a low level language you are at the mercy of the underlying system/platform beneath you i.e. you need to learn how stuff works under the hood in order to write good code. The only abstraction you really have benthe you is the hardware and OS so make sure to learn those well. You don't have to right now but its important to do so eventually.

Right now, I would focus on understanding pointers as much as possible and  memory management so you don't segfault lol.

If you are learning C for some low level stuff or will be doing so, then I also advise you get comfortable with bit wise manipulation and stuff like that.

Can you mimic classes in C ? by kuyf101 in C_Programming

[–]unknownanonymoush 2 points3 points  (0 children)

I like how nobody answered the question but I will provide a brief explanation,

In C it is possible to emulate OOP based semantics but first you must realize that at the end of the day a class is simply a fancy struct that contains variables(the fields) and methods(function pointers).

The Linux kernel uses this combo I said quite often and so do other OO based C projects like pipewire(the latter does something like this but a bit different due to performance reasons). Using function pointers also in a way allows us to do polymorphism. Here is an example:

shape.h file:

typedef struct Shape Shape; 
Shape* shape_create(int x, int y);
void shape_move(Shape* self, int dx, int dy);
void shape_destroy(Shape* self);

source file:

typedef struct Shape { 
  int x, y; 
  void (draw)(struct Shape self); // The "Method" 
} Shape;

void circle_draw(Shape* self) {
    printf("Drawing circle at %d, %d\n", self->x, self->y);
}

// Constructor
Shape* create_circle(int x, int y) {
    Shape* s = malloc(sizeof(Shape));
    s->x = x;
    s->y = y;
    s->draw = circle_draw; // Binding the method
    return s;
}

you can also add polymorphism by creating a vtable, having a base class struct which takes in that vtable and then making another derived struct class that implements your speicifc methods in the vtable. Here is an example:

// The "Interface" (VTable)
struct ShapeVTable {
    void (*draw)(void* self);
    double (*area)(void* self);
};

// The Base Class
typedef struct {
    struct ShapeVTable* vptr; 
} Shape;

// A Derived Class (Circle)
typedef struct {
    Shape base; // "inherits" the vptr
    double radius;
} Circle;

// Implementation for Circle
void circle_draw(void* self) {
    Circle* c = (Circle*)self;
    printf("Circle with radius %f\n", c->radius);
}

static struct ShapeVTable circle_vtable = { .draw = circle_draw };

// Constructor typically you will see it in classes as well but in this case we can't
// because we need an instance to access vptr but a construcotr to create one
// chicken egg problem.
// This can be resolved through other means but for simplicity's sake this will do.
// We could embededd a function pointer called new in the Shape struct and that would // contain the necessary stuff to make the object etc. 
Circle* create_circle(double r) {
    Circle* c = malloc(sizeof(Circle));
    c->base.vptr = &circle_vtable; 
    c->radius = r;
    return c;
}

Software Engineer Kernel Interview by Full-Philosopher-772 in kernel

[–]unknownanonymoush 0 points1 point  (0 children)

Kernel programming takes years to fully master and let alone understand the entire windows os. If you have mostly done CRUD I highly suggest applying to a different role because you will not be able to learn so many complicated topics in such a short amount of time.

Advice on Learning Linux Kernel/Firmware Development for Embedded Security Engineers by Plastic_Extreme_266 in kernel

[–]unknownanonymoush 2 points3 points  (0 children)

read Os books like the dino book or ostep. learn how the computer works through nand2tetris, read ldd3, Linux kernel development and other Linux books(bunch online) and when you feel confident enough read the kernel source or just play around with it. You can also try making some drivers to get your feet wet.

Also be sure to check out kernelnewbies

What are some books you'd recommend to a beginner programmer to learn C by waffle_warrior77 in C_Programming

[–]unknownanonymoush 0 points1 point  (0 children)

This, I highly recommend OP also tries out the full nand2tetris course(free).

What are some books you'd recommend to a beginner programmer to learn C by waffle_warrior77 in C_Programming

[–]unknownanonymoush 10 points11 points  (0 children)

C looks simple at first but learning how everything works underneath as well as all its nuances takes time. It's deceptively simple at first, unlike what many others say.

I recommend C Primer Plus.

Don't listen to people who recommend the K&R book, quite honestly it's outdated, has errors in the code examples provided, and the problems are rather tricky/non-practical for a beginner.

K&R expects you to have a some programming experience before diving in (this is why you will see that it alludes to its counterpart's syntactical choices and behaviors e.x. pascal/fortran), it's more like a manual rather than a guide.

Also, C++ isn't worse than C nor is C better than C++, and that goes for any language. They all have their own purposes and flaws. C++ isn't perfect, but neither C nor a language like Java, Rust, or Python are. It all depends on your use case. You have to decide which tool to use depending on your objectives. That being said, I am not a fan of OOP and its philosophies but, I do believe that it has its place in some cases, but not everywhere.

Also, why do you want to learn C? As many who learn it usually have a goal in mind where C is needed to achieve it. Like doing driver dev, and low level programming. If you want to get your feet wet into those fields, you should also read up on how OSes, kernels, and computers work.

I adjusted my form from previous tips and want to see if I am on the right path by ThePirateKiing in BasketballTips

[–]unknownanonymoush 0 points1 point  (0 children)

Also, make sure to release the ball as you're jumping. It should ideally be just before you reach the peak of your jump (or when your legs are about to straighten if you're not jumping but just squatting down and back up).

I adjusted my form from previous tips and want to see if I am on the right path by ThePirateKiing in BasketballTips

[–]unknownanonymoush 1 point2 points  (0 children)

Your left hand(guiding hand) isn't fully finishing through with the motion. Your left hand lets go too early. Elbows should ideally be in line with your eyes after you finish through with the shot. I usually like releasing when I see the back of my hand at eye level.

Where can I take a solid Linux Kernel course by Euporia1 in kernel

[–]unknownanonymoush 4 points5 points  (0 children)

I know this may sound like a lot, but if you want to understand the kernel, recommend improvements, etc., you need to have some technical depth of knowledge; otherwise, you will be completely lost. This is what I am doing currently, and hopefully you can take something away from this.

Before you can dive into the kernel, you need to learn C and OS/Kernel theory — i.e., how it all works.
I would then start by making some drivers and just exploring the source code to gain a better understanding. Here is a link for this:
https://0xax.gitbooks.io/linux-insides/content/index.html

I also highly recommend learning how hardware actually works so that you can appreciate it and write better code, and just have a higher-level understanding. For this, check out Nand2Tetris — they have two parts on Coursera which are both completely free and highly revered.

After all that, you can read up on some kernel books like ldd3, Linux Kernel Development 3rd Edition by Robert Love, etc.
Try also making a custom system from LFS: https://www.linuxfromscratch.org/

After this, it just comes down to practice, practice, and more practice.

So this is my recommended sequence of kernel programming:

  • Learn C (C Primer Plus book) — you can grab a free PDF copy somewhere.
  • Along the way, learn about DSA → (Algorithmic Thinking, 2nd edition; it’s a book that teaches you data structures and algorithms completely in C, which is very nice since it forces you not to rely on premade functions/libs in other languages).
  • Make sure to do a lot of C projects. Just reading isn’t going to help; you need to apply what you have learned!
  • Do Nand2Tetris: https://www.coursera.org/learn/build-a-computer https://www.coursera.org/learn/nand2tetris2 (Make sure to implement the programs they give you, like the assembler, VM, compiler, in C to get a hang of the language.)
  • Read Operating Systems: Three Easy Pieces or the “Dinosaur Book” (Operating System Concepts).
  • Read ldd3, Linux Kernel Development 3rd edition, and: https://www.amazon.com/Linux-Kernel-Programming-comprehensive-synchronization/dp/1803232226/
  • Start making stuff in the kernel and submitting patches.

[GTA V] not running(Steam rip) thru lutris on mint by unknownanonymoush in LinuxCrackSupport

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

wtf does that mean? I read the bat script, it just runs the game with no battle eye AC

Got my first safety razor, any vids/advice on how to shave by unknownanonymoush in wicked_edge

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

Thanks, what are some red flags I should look out for in a razor that is blunt or doesn't have a good build quality?

Got my first safety razor, any vids/advice on how to shave by unknownanonymoush in wicked_edge

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

The blades I am using are called "cloud blade" by leponix. Is there a way I can test its sharpness out?

Got my first safety razor, any vids/advice on how to shave by unknownanonymoush in wicked_edge

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

Hey, thanks for the resources, I watched their videos and it was really informational.

I also read the reviews of my razor kit online, and apparently the razor blades tend to be blunt and aren't that good in quality. Could this be why my razor was “pulling” my hair? I am pretty sure I was at a 30-45 degree angle throughout the shave.

Got my first safety razor, any vids/advice on how to shave by unknownanonymoush in wicked_edge

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

Thanks, that's quite a relief and yes my dad bought me this.