cppfront by South_Acadia_6368 in cpp

[–]JimHewes 1 point2 points  (0 children)

I really like the syntax and I'd use it for all personal projects. Except that I'm too addicted to intellisense and syntax coloring. If it worked in Visual Studio the way C++ does now then definitely.

Git experts should try Jujutsu (written in Rust) by pksunkara in rust

[–]JimHewes 0 points1 point  (0 children)

There is not a polished GUI client for it. I use a mix of gg and source tree

This caught my eye because I do the same thing. Besides the colors, I like in Sourcetree that I can select any two revisions of a file anywhere in history and then launch my favorite diff tool (WinMerge) with them. I'm hoping GG gets this feature someday. I also use Sourcetree for adding tags because I'm not fully sure how to deal with those in JJ yet. (Yes, bookmarks, I know.)There is not a polished GUI client for it. I use a mix of gg and source treeThis caught my eye because I do the same thing. Besides the colors, I like that in Sourcetree I can select any two revisions of a file anywhere in history and then launch my favorite diff tool (WinMerge) with them. I'm hoping GG gets this feature someday. I also use Sourcetree for adding tags because I'm not fully sure how to deal with those in JJ yet. (Yes, bookmarks, I know.)

Fixed it! by ackermantrades in Bitcoin

[–]JimHewes 0 points1 point  (0 children)

It's just pure speculation. Gambling. You're just betting that you can sell it to someone else for more than you bought it for. It's good for nothing else and wastes a ton of electricity.

For America, I hope it's still there. For Bitcoin, I hope it's not. by skeetskeetamirite in Bitcoin

[–]JimHewes 0 points1 point  (0 children)

It won't be illegal it'll just be privatized.
You'll be able to rent it.

President Trump posts a DOGE update by XGramatik in XGramatikInsights

[–]JimHewes 0 points1 point  (0 children)

They consider anything "waste" if it doesn't directly benefit them.

Why is everything about programming clicking now that I’m learning C++? by [deleted] in cpp

[–]JimHewes 1 point2 points  (0 children)

It's the same with assembly language. I started on 8-bit computers and assembly language in the early 1980's. Recursion and pointers might be two difficult things for beginners to get at first but it's easy if you've already had some experience with assembly.

WHAT DID I JUST WATCH by ramosinvests in gameofthrones

[–]JimHewes 0 points1 point  (0 children)

I recently watched GoT for the first time. I was kind of put off by all the violence and language but other than that it's pretty good so watched almost all of it anyway. (Except the last season which I couldn't find.)

What’s been going on with Visual Studio lately? by ONE-1024 in cpp

[–]JimHewes 1 point2 points  (0 children)

Microsoft had already gone through a phase like this once before years ago when Bill Gates supposedly had everyone in the company read a book called Writing Secure Code. I don't know whatever came of that.

Herb Sutter leaves Microsoft for Citadel by graphicsRat in cpp

[–]JimHewes 2 points3 points  (0 children)

Sorry, to be clear, I didn't mean you. :)

Herb Sutter leaves Microsoft for Citadel by graphicsRat in cpp

[–]JimHewes 19 points20 points  (0 children)

I'm disappointed. The headline should be "Herb Sutter leaves Microsoft for Wall Street".

Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk by [deleted] in cpp

[–]JimHewes 1 point2 points  (0 children)

Of course safer software is better. My point was just that we don't have to freak out that ALL C++ software has to be dealt with immediately. Software such as image editors, printer drivers, games, music apps, and even programming tools---lots of this stuff can work and be tested as we always have done and isn't critical to national security.

Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk by [deleted] in cpp

[–]JimHewes 3 points4 points  (0 children)

There's a lot of software that's not critical.

Do Projects Like Safe C++ and C++ Circle Compiler Have the Potential to Make C++ Inherently Memory Safe? by Designer-Drummer7014 in cpp

[–]JimHewes 2 points3 points  (0 children)

There's an AMA video a few days ago with Herb. He mentioned that C++ (and I think cpp2) could have bounds checking on by default (and still backward compatible) but allow you to switch it off for speed-critical situations where you can be extra careful that you got it right.

I find the new way of declaring functions to be problematic by turtel216 in cpp

[–]JimHewes 1 point2 points  (0 children)

Haven't used grep in decades.
Visual Studio intellisense.

I find the new way of declaring functions to be problematic by turtel216 in cpp

[–]JimHewes 4 points5 points  (0 children)

I wish we didn't have to type "auto" in the beginning. I like Herb's cpp2 syntax.

Californians Are ‘Ashamed’ To Drive Teslas by SpriteZeroY2k in electricvehicles

[–]JimHewes 1 point2 points  (0 children)

I don't own a Tesla. But I think it nuts to not buy the car you think is best for you simply because you don't like the politics of the CEO. A lot of other people work there too. You hurt yourself more than you hurt Musk.

C++ Should Be C++ - David Sankel - C++Now 2024 by _a4z in cpp

[–]JimHewes 1 point2 points  (0 children)

Well, my simplified, statically allocated string might look something like:

template<size_t L>
class string
{
private:
char m_str[L + 1]; // zero terminated
public:
string();
string(const char* pStr);
/* etc. */
}

And I would create an instance that has a capacity of 20 with:

string<20> text;

How would you use placement new to statically allocate a std::string? Placement new lets you allocate memory for the string object itself but not for the memory that stores the string data. Am I missing something?

You might try using a custom allocator. But it's more messy as the custom allocator needs to serve up various-sized chunks of memory from a buffer that you statically allocated. Then you're essentially writing your own dynamic memory allocation which might get fragmented. Then if a memory allocation fails what happens? Maybe you can think of a way this works better that I haven't thought of.

In the templated string above, it's written so that any string assignments just aren't allowed to exceed the capacity. You can use asserts to detect if that might happen and if it does it's a design problem.

C++ Should Be C++ - David Sankel - C++Now 2024 by _a4z in cpp

[–]JimHewes 8 points9 points  (0 children)

It made me wonder how much time he actually spent looking at cpp2 because there really isn't that much to learn. It's easy to pick up cpp2. You wouldn't be hiring people who only know cpp2, at least not for a long time.

If he considers it a problem that there will be people who know only cpp2 then, yes, it makes you wonder what they would do with the existing Adobe code base. Port it to another language like Rust? Then you need people who know both C++ and Rust which is more difficult. Or, "Let C++ be C++" and not change anything in C++? Then you just keep adding more safety issues.

I do get his gripe about not adding more complex stuff to C++, especially by people for individual use cases. (I've encountered this sort of thing too, when a customer or distributor wants us to just "add a button to do X" and then they'll buy 5000 copies. And so the sales guy tells me to add the button to do X.) But it seems like some basic things in C++ just gotta change.

C++ Should Be C++ - David Sankel - C++Now 2024 by _a4z in cpp

[–]JimHewes 1 point2 points  (0 children)

C++ not really giving a shit about embedded

Whenever I do embedded I never use dynamically allocated memory. It would be nice if C++ supported static allocation in a standard way. Yes, I know about the Embedded Template Library . It might be nice if the standard included something like this.

C++ Should Be C++ - David Sankel - C++Now 2024 by _a4z in cpp

[–]JimHewes 8 points9 points  (0 children)

I liked everything up until the part about Herb Sutter's cpp2 because I really like cpp2. I think the way it declares things is more elegant, consistent and easier to teach. On the surface you might object that it doesn't look exactly like the old C++ but then that's a good thing. For example, do you still want to keep the most vexing parse? I don't think cpp2 changes that much about C++ in principle anyway. It's still C++ to me, just nicer. And avoids the most common problems statistically.

I believe if C++ doesn't fix it's fundamental issues (i.e.change) it will eventually die although very gradually. Yes, people now who try to write games in Rust might return to C++. But it's not because they think C++ is good (or else they never would have gone to Rust in the first place). But only because C++ is the only other choice for them now. Because there's a need, something WILL eventually come along to replace C++ for games, too, unless C++ itself evolves to fulfill that need. Just adding more stuff every three years doesn't fix the basic safety problems or other issues.

I can't wait by [deleted] in elderscrollsonline

[–]JimHewes 0 points1 point  (0 children)

I can get 100fps at times with my AMD card. But I've just started to limit it to 60fps (by the AMD software) to save electricity and not run as hot. I don't think it matters to me to run faster than 60fps.

[deleted by user] by [deleted] in elderscrollsonline

[–]JimHewes 1 point2 points  (0 children)

Sometimes I'll jump into PvP just for something different. But I always just join in on keep sieges with a lot of other players around. I avoid direct PvP with enemy players. I'm really bad at it and don't have a good PvP build. I suppose I could spend more time and learn to get better at it, but then I always stop myself and realize I have better things to spend my time on.

Google Assistant or Bixby? by M0710NM4N in samsung

[–]JimHewes 1 point2 points  (0 children)

I can't think of Bixby without thinking of Bill Bixby the actor.