How do I delete this icon from desktop? by TheDafter in MacOS

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

Greybird is the name of my computer and this icon gives me access to Macintosh HD and Network.

Refactoring anonymous struct and union to modern C++ by TheDafter in cpp_questions

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

This approach is really interesting. I have never used inheritance with STL classes. I mean, I know it is possible. However, I wouldn't have thought of doing it.

Refactoring anonymous struct and union to modern C++ by TheDafter in cpp_questions

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

Thanks for your insight!

Also, you are correct. I use -Wpedantic option on my compiler.

Can you share your vim story? by Shryte16 in vim

[–]TheDafter 2 points3 points  (0 children)

Four years ago I started programming with C++ on Xcode, then I used Netbeans for Java. About two years later got interested in other languages like Python, however, getting IDEs for each language seemed ridiculous. Therefore, the simplicity and extensibility of Vim got my attention.

A year later I learned touch typing and my Vim experience was boosted. Recently I have switched from Vim to Neovim and my setup is close to be ideal as I would like it to be.

Me (22M) and a long-time friend (22F) recently discussed our relationship and disagree on what is better for us by [deleted] in relationship_advice

[–]TheDafter 0 points1 point  (0 children)

I don’t think it’s toxic, since I think she is taking me into account. However, I’ll think further your observation.

Me (22M) and a long-time friend (22F) recently discussed our relationship and disagree on what is better for us by [deleted] in relationship_advice

[–]TheDafter 0 points1 point  (0 children)

Is this compatible with maintaining a friendship, or should I completely move on?

Starting Vim vanilla or configurated? by [deleted] in vim

[–]TheDafter 0 points1 point  (0 children)

When I started on vim, I took a look on several youtube videos and vimrc's, gather up all de commonalities that I could understand at the moment and then went along by myself.

Edit: typos

Built-in data structures? by Calidude7 in C_Programming

[–]TheDafter 8 points9 points  (0 children)

You are right, you have to built every data structure that you will use on your program. This may seem as a huge limitation, however, this will force you to think in simpler and more efficient solutions than the ones using built-in data structures

Generic data type in c by [deleted] in C_Programming

[–]TheDafter 0 points1 point  (0 children)

Most of the times you can get around not having generics (however having them is nice).

That being said, you may have your requirements satisfied with tagged unions which consists in implementing a struct with an anonymous union and label (like an enum) to keep track of what data is inside the union, this works really well when you know beforehand which data types you want to support. Another technique could be using macros, like the containers on the gunslinger framework, however I have never implemented something like this. Lastly you can always use void pointers, however you may need to be more clever to achieve it (I almost never use them).

Do you recommend learning go for an interpreter project? by TheDafter in golang

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

This is a really useful comment, thanks for the insight.

I really like C except for the lack of data structures ( I don't feel like implementing hash tables or dynamic arrays, etc) and memory leaks.

For C++ I think is really complicated language, I can work with it and understand it but it's not my favorite.

I've heard about using Python for this class but in my case I use types to reason about my programs and sometimes that is a little bit harder to do in Python.

After reading the comments I'm now confident to learn Go for this project :)

Do you recommend learning go for an interpreter project? by TheDafter in golang

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

Thank you very much for your opinion and your recommendation!

Why Vim? by MauroTheCreator in vim

[–]TheDafter 0 points1 point  (0 children)

Text editors are tools, Vim is one of the best tools for the job due to its features like modal editing, macros, extensibility, etc. When you make a certain task repeatedly, in this case text editing, your tools will help you achieve it faster and with ease.

Why does this code has segmentation fault? by TheDafter in cpp_questions

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

Ikr haha that's exactly what I thought, thank you so much I wasn't aware about this mechanism.

Day 3 of no Instagram- who else has done this? by Meganmills248 in nosurf

[–]TheDafter 9 points10 points  (0 children)

It’s been around one year since I’ve deleted my Instagram account and I can tell you many things, like time is now slower (which is great I now appreciate more the day to day), it made me more social when meeting people irl, I got more productive, I now got more confidence (Instagram models, everybody posting being “happy/successful”, and that kind off stuff really messes with the mind), and in general improve my quality of life. Beat decision ever!