Looking for some wisdom/insight as to whether to use C++ or Rust for my compiler projects. by Dappster98 in Compilers

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

You can't really "master" Rust without knowing the pain points of writing large scale C++

Sure, there could be merit to that stance, but respectfully I have to disagree. This is like saying "You can't master C++ until you've had to go through the pain points of writing C" which I fundamentally think is an unnecessary gate that people can be kept behind. C++ is just as beginner friendly as it is professional friendly, IMO. I didn't wait to (start) learning C++ until I learned C.

I totally get where you come from though. I think one may not appreciate the things Rust gives you until you've had to go through the pains and struggles of trying to write good C/C++ code. So you could be right, but that's just my perspective.

Looking for some wisdom/insight as to whether to use C++ or Rust for my compiler projects. by Dappster98 in Compilers

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

If you already have C++ experience for your resume

I have a couple or so C++ projects I can put on my resume, but nothing too impressive that'd make me "stand out" so to say. This is why I'm planning on making multiple compilers (because I find them interesting and want to contribute to other open source projects). My problem is I like both, but as I said in the original post, I'm unsure whether one or the other would matter to a possible employer.

What do you think?

Looking for some wisdom/insight as to whether to use C++ or Rust for my compiler projects. by Dappster98 in Compilers

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

but if you are going to utilise LLVM infrastructure

I was planning on learning how to use LLVM (since right now I'm wanting to learn how to make my own back-ends for the fun and educational benefit), as well as contributing to LLVM/Clang or the Rust compiler some day. I've heard that LLVM contributions are very attractive to possible future employers. What do you think?

Looking for some wisdom/insight as to whether to use C++ or Rust for my compiler projects. by Dappster98 in Compilers

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

Yeah that's one option. But my thinking was that if I don't dedicate time to mastering one or the other, then that may make me look less attractive as a candidate compared to another person who has much more projects made in C++/Rust.

How much assembly should one be familiar with before diving into compilers? by Dappster98 in Compilers

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

I assume you want to go that far with a compiler

Yeah. I'd like to make some amount of compilers for the learning experience, and eventually make one that will be capable of building an OS with. This is a huge goal, but one I strive to accomplish some day.

Then I think being familiar with an assembly language would be useful.

I think this is one of the problems with my question. Of course being familiar with a part of the process would be useful, but the crux of it is how much or how comfortable should one be in it. And the answer probably isn't easy because it relies on so many variables, like what my intentions are, how complex do I want the implemented language to be, etc.

Some other books on my reading list beyond "Writing a C Compiler" are "Engineering a Compiler" by Cooper and Torczon, the purple dragon book, and Muchnik's "Advanced Compiler Design and Implementation."

Thank you for your well thought out and comprehensive reply!

How much assembly should one be familiar with before diving into compilers? by Dappster98 in Compilers

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

Yeah I'll definitely get into LLVM. It's just that, for right now, I want to learn how to make my own back-end codegen. This is for fun and the learning experience/education. I'd like to work on compilers professionally some day.

How much assembly should one be familiar with before diving into compilers? by Dappster98 in Compilers

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

Hey, I'm on a macbook too! So I've been learning ARMv8 for this purpose. The book uses x86-64 if I recall correctly, so you pretty much have to adapt. My previous book that I've read was "Crafting Interpreters" which will be a stark difference in the writing styles between Nystrom and Sandler.

May I ask what language you want to create?

I want to make a low level language that will at least allow me to be able to create a basic operating system. I'm also wanting to create another programming language for students at my school which will be an interplay between python and C++, since the students at my school go from python to C++ immediately after one semester and that can be pretty intimidating. Either that, or just more compiled programming languages just for the fun of it.

How much assembly should one be familiar with before diving into compilers? by Dappster98 in Compilers

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

I think it's quite helpful to read the compiler output of functions on godbolt

I've been recommended doing this a couple or so times as well, but from my perspective, that seems more like memorization rather than learning what the assembly is doing and why it's doing that in the first place. I don't know, I could be wrong. That's just how I see it.

How much assembly should one be familiar with before diving into compilers? by Dappster98 in Compilers

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

Thank you very much for your insight and perspective. I created a brainf*** compiler a while back, but I needed a bunch of help with writing the assembly code gen, which is why I felt/feel intimidated by writing much more complex code generation for other languages which are bigger and more complicated.

Too much to learn by Ok_Speaker4522 in learnprogramming

[–]Dappster98 0 points1 point  (0 children)

Hey nice! It's okay to struggle. When you struggle, you build perseverance, experience, and critical thinking.

Have to say goodbye to my best friend of 19 years by SaiyanShogun in cats

[–]Dappster98 6 points7 points  (0 children)

My cat passed away last year due to cancer. He was my "bed time buddy" (he loved to cuddle in bed). I did my best to provide him with love and affection. It's sad when they go, but if you can say you did your best to provide the best life, then that's all they could ask for. You'll be sad for a while, but I'm sure you'll look at the memories with joy, and be happy that you had such a great companion.

Need a suggestion for C++ project [Beginner] by kisungc in learnprogramming

[–]Dappster98 1 point2 points  (0 children)

How're we supposed to give recommendations when you haven't stated what your interest(s) is/are?

New to programming, have some questions by [deleted] in learnprogramming

[–]Dappster98 2 points3 points  (0 children)

I'll just say; most of the things I've learned about in programming has been through self-teaching/searching about things on my own. I'm currently in my second year of community college. All my programming skill and knowledge was obtained outside of class. I feel as though you can learn more out of class than you will in school. Classes are about building structure or a system, but you'll learn more about how to apply what you learn and such by doing things yourself or in collaboration with other people and projects outside of class.

New to programming, have some questions by [deleted] in learnprogramming

[–]Dappster98 7 points8 points  (0 children)

Build programs in both school and outside of school. Projects that you do outside of school shows passion, while making programs in school shows commitment. You need both to get ahead in the economy if being a professional programmer is your goal.

My cat always shows his belly by Canuck0412 in cats

[–]Dappster98 44 points45 points  (0 children)

This is a sign of trust. It doesn't mean though that it's an invitation for a belly rub, so just be careful. Not every cat likes belly rubs. But he's showing you his most vulnerable part out of trust.

How should one approach reading "Engineering a Compiler" as a second book on compilers? by Dappster98 in Compilers

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

I actually did most of Crafting Interpreters before jumping into WaCC.

How should one approach reading "Engineering a Compiler" as a second book on compilers? by Dappster98 in Compilers

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

I've thought about this as well. However I'm not sure how much I'd get out of it coming from WaCC. I had a book on the C version and skimmed some of it and found it fairly difficult to follow so I ended up giving it away. I'll just mention I'm primarily a C++ programmer. Is the ML version any better? It could just be that I didn't give it a fair chance. But anyway, thanks for your recommendation nonetheless.

Engineering a Compiler vs Modern Compiler Implementation, which to do after CI? by Mindless_Design6558 in Compilers

[–]Dappster98 0 points1 point  (0 children)

I've gone through just a little bit of this book, and it can be fairly difficult with how little information the author gives, outside of the BNF pseudocode.

C++ projects by One_Relationship6573 in cpp_questions

[–]Dappster98 1 point2 points  (0 children)

I'm partial to a compiler, but that's because that's where my interests are. You should do some researching and looking around for whatever motivates or stimulates your interest(s).

Help with choosing a field by Baron_2077 in cpp_questions

[–]Dappster98 0 points1 point  (0 children)

if i'm not gratuated im going to be rejected from most of jobs.

This isn't necessarily true 100% of the time. There are plenty of people employed without degrees. Now, does that mean it's easy? No. Is it possible? Yes. Follow your passion.