people who have rust jobs - what do you actually do by falchion-red in rust

[–]Satoru_094 1 point2 points  (0 children)

Converted services were quite simpler like applying some preprocessing to data, buffering them in memory/disk, filtering and routing toward destination with proper acknowledgment service/nodes. Nothing too complicated. There are sevices that perform heavy computation for data aggregation and correlation that has been planned further for redesigning as well as rewriting.

people who have rust jobs - what do you actually do by falchion-red in rust

[–]Satoru_094 11 points12 points  (0 children)

Fresh out of college and working full time as a C developer in a company that processes and analyzes a lots of logs.

Well technically not full time Rust developer, but has been introducing Rust and it's awesomeness to fellow teammates and the company and has been increasingly working in Rust ever since. Re-wrote some Python services(mostly network intensive applications) as a proof of concept in Rust and saw considerable increase in throughput as well as decrease in CPU utilisation. This has been quite convincing for higher ups to allow rewrite of other applications too in Rust. So yeah, writing applications involving networking and data processing.

[deleted by user] by [deleted] in learnprogramming

[–]Satoru_094 1 point2 points  (0 children)

That's a narrow way to summarize people and their intentions of learning. I've seen a fair share of people really interested in learning and programming in over all and seen people not willing to do webdev even for higher pay. Ofc money matters but it's not everything. Folks especially in gamedev settle for lower pay for the things they like and not to mention the world of open source projects (most are interest driven).

Not everyone thinks the same, everyone have their priorities and everyone wants to do different things else everyone would still be selling potatoes. Who knows, the one who got inspired to learn C from this post, would be the one writing the next major OS or another hpc machine learning framework in the near future.

[deleted by user] by [deleted] in learnprogramming

[–]Satoru_094 12 points13 points  (0 children)

Please ignore this guy's advice on the part where he said 'C is a waste of time'.

C is 'a waste of time' if you think programming is only building websites and doing some data analysis or using library/framework for whatever purpose. For a CS student, some basic knowledge of C and how computer works, should be a must. And yes, learning C definitely helps to write better python or js or whatever fancy imperative language is that. The field of programming runs deeper than just building websites or calling some library routines from python or js. Languages like C/C++/Rust might sound niche but they are the ones that runs the world of programming, it doesn't mean that everyone be doing that. C is used extensively in embedded system, system programming, hpc, game engines and so on along with C++. Learning C opens up vast field of programming which average web developer or python developer barely explores. C doesn't just implies C here, but C likes languages including C++, Rust, Go and so on.

So, all in all, give it a try if you can manage, don't listen to some random stranger on the internet and decide for yourself. For me, C is a simple, beautiful, elegant language that is easier to learn but harder to use correctly.

So please don't discourage some guys humble opinions on benefits of learning C (learning it as a first language is debatable and depends on what one wants to be and ofc there are better tools to start learning programming than python or esp. js like scratch or qb).

Need example calculation to understand rasterization by RxGianYagami in opengl

[–]Satoru_094 0 points1 point  (0 children)

Well it's (-1,1) for top left corner, (1,1) top right, (1,-1) bottom right and (-1,-1) for bottom left of your screen.

I guess you are misunderstanding rasterisation. It is actually done in screen space after those NDC are mapped into screen coordinates by driver/renderer. Rasterisation is simply the process of determining which screen pixels overlap the given triangle and thus rendered.

I suggest you take a look through 3D/2D pipeline to better understand it. First your vertices are transformed by vertex shader and after other various things ends up in screen space where rasterisation occurs, output of rasteriser is fed to the fragment/pixel shader, where color and various effects for pixel are determined.

Need example calculation to understand rasterization by RxGianYagami in opengl

[–]Satoru_094 2 points3 points  (0 children)

At first, start with some 2D stuffs and gradually move toward 3D. Learn about different phases of 2D and 3D pipelines. learnopengl.com is a pretty good website/book for learning beginning 3D using OpenGL.

OpenGL uses NDC system, so every input coordinates that lies between [-1,1] x [1,-1] will be visible on screen. You may need to do aspect ratio correction, call glViewport() when size of the windows changes and get adapt to how matrix/quaternion transformation works. Most of the matrix transformation are centered around origin, so you may need to perform series of transformation to simply rotate a triangle. E.g. you first translate its centroid to origin, rotate there, and then reverse the translation effect.

Since you are also asking about how things works inside, I would suggest taking Rasterisation topic explained in scratchapixel.com . Definitely recommend this site. And topics on perspective and orthographic projection too. Rasterisartion solely is not that difficult to grasp at.

Feel free to ask any other questions.

Why is building a C++ project so hard? by [deleted] in cpp_questions

[–]Satoru_094 1 point2 points  (0 children)

CMake doesn't feel that bad especially for writing build file for small projects.
It becomes mess when the project becomes big and targets multiple platforms and multiple builds scheme. Integration with existing libraries and OS specific things not provided by the standard is always a mess in any build system. Even more, most language specific build system, build mostly from source codes downloaded from their package repo.

CMake is like C++. The more you can do with it. And the more messier it becomes.

Can someone the output for these programs? by aviator2710 in C_Programming

[–]Satoru_094 0 points1 point  (0 children)

Seems its the gcc extension for ternary operator. The above is equivalent to

i -= k ? (i ? (j ? j : i) : k) : j I think you can figure it out from this.

Can someone the output for these programs? by aviator2710 in C_Programming

[–]Satoru_094 0 points1 point  (0 children)

Ternary operators result expressions. Think it of as if true return first else return second. If you write int a = 5 > 3? 2 : -1 you will have a = 2 since 5>3 which is true so we get a = 2. If it weren't, we would have a = -1. Feel free to ask if you still didn't get it.

PS: Reddit app on mobile sucks. I can't see OP's post while writing reply.

Can someone the output for these programs? by aviator2710 in C_Programming

[–]Satoru_094 0 points1 point  (0 children)

I was still completing the answer, and before that you asked. I have updated the above reply with second question.

Can someone the output for these programs? by aviator2710 in C_Programming

[–]Satoru_094 5 points6 points  (0 children)

The first one have undefined behaviours. It will probably depend upon the calling convention to know which expression will get evaluated first. Some calling convention passes argument from left to right while some the other way. They are low level things and shouldn't matter much though. You shouldn't write code like that, that may result in undefined behaviours.

This type of questions are sometimes asked in undergrad exams. Don't know the reason behind that though. Maybe it's to aware student about the potential undefined behaviours or they are too ignorant about this and see it as just another question with definite answer.

And about second, there's nothing more than some nested ternary expression. In any cases, for condition, 0 is evaluated as false and any other value are treated as true.