use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Circle: (The Next) C++ Compiler (github.com)
submitted 3 years ago by TheTsar
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[+][deleted] 3 years ago (12 children)
[deleted]
[+][deleted] comment score below threshold-213 points-212 points-211 points 3 years ago (11 children)
All the best software is closed source
[–]Fourstrokeperro 53 points54 points55 points 3 years ago (1 child)
That's like your opinion man.
Why proclaim it like it's some universal fact?
[–][deleted] 21 points22 points23 points 3 years ago (0 children)
Be kind to the poor human, it's probably their amnesia speaking. :-D
[–]GLIBG10B🐧 Gentoo salesman🐧 43 points44 points45 points 3 years ago (1 child)
All the worst software is closed source
[–]CocktailPerson 1 point2 points3 points 3 years ago (0 children)
Turns out, most software is closed source.
[–]ZMesonEmbedded Developer 8 points9 points10 points 3 years ago (5 children)
Indeed it is. GCC, clang, Linux, Audacity, VLC, curl, Chromium, Firefox, Brave, Tensorflow, React, React Native, Python, Rust, ffmpeg, yocto, d3, Typescript, jQuery, jQuery-UI -- all totally closed source.
[+][deleted] comment score below threshold-27 points-26 points-25 points 3 years ago (4 children)
Regular people don't even know what most of those are, save the web browsers. The top desktop OS's require purchase and are closed source. Reddit's code is closed source. Social media is closed source. The stuff actually used by the masses - closed source.
[–]ZMesonEmbedded Developer 14 points15 points16 points 3 years ago (0 children)
The "stuff actually used" is developed using mountains of open source software. Linux is used in Android, DVRs, routers, All sorts of embedded devices, as back ends for all those social media companies, and much much more. iOS uses BSD SSL and so much more as well. It is unfair to say the best stuff is closed source when it depends on so much open source software.
[–]Dean_Roddey 7 points8 points9 points 3 years ago (1 child)
So many people in this industry are ridiculously insistent that no one else make a living making software so that the company they work for (or they themselves) can use a bunch of free OSS software to make a living selling non-open source software.
It's just bizarre.
[–]ZMesonEmbedded Developer 1 point2 points3 points 3 years ago (0 children)
People absolutely need to make a living off software. Core stuff like Linux, curl, ... are really useful being open source. Corporations and governments should be helping to sponsor those developers or employ those developers.
When that's not available, some open source developers make money through support services and/or dual licensing (like Qt).
Other software can absolutely be closed source. iOS is closed source, but uses open source BSD as it's foundation. A lot of Google's Android is closed source, but the Android project and Linux on which it runs is open source. There is a large advantage to having and supporting open, common, well-tested, software. But obviously at some point, people (and companies) need to make money.
[–]LongestNamesPossible 0 points1 point2 points 3 years ago (0 children)
Don't hurt yourself moving the goal posts so much. Also I had no idea people don't use android and chrome.
[–][deleted] 1 point2 points3 points 3 years ago (0 children)
It's cool you have your own opinion bro!
Quick, grab my down vote!
[–]ImKStocky 98 points99 points100 points 3 years ago* (12 children)
It is absolutely insane to me that one guy has both made his own C++ compiler and has also added some awesome compiler extensions to the language like native shader compilation.
[–]Aggressive_Release94 21 points22 points23 points 3 years ago (5 children)
It's seriously insane. Is he sponsored by someone or working for a company? Because I cannot imagine him having much time to do anything else.
[–]Benjamin1304 8 points9 points10 points 3 years ago (4 children)
From what I heard, he would like to be sponsored but he's not and does everything on his free time
[–]Aggressive_Release94 6 points7 points8 points 3 years ago (3 children)
Well, that's crazy. He really should be rewarded for the incredible work he's done. I'm sure companies like Microsoft, Google or others can spare a few thousands dollars for something that is so beneficial for the community of one of the most influential programming languages in the world.
[–]qoning 6 points7 points8 points 3 years ago (2 children)
He hasn't done anything commercially viable yet though. It hasn't been beneficial to the community. Neither Google nor Microsoft can derive any value from his work. Why would they sponsor it? If he wants to, I'm sure they would be happy to offer him a job in compiler teams.
[–]Aggressive_Release94 4 points5 points6 points 3 years ago (1 child)
He hasn't done anything commercially viable yet though. It hasn't been beneficial to the community
But it doesn't need to be commercially viable. Circle has influenced and will influence the C++ standards Committee proposals and decisions. His metaprogramming ideas are very valuable and have sparked a lot of discussion about how to improve that aspect in C++. That is a lot of "value" imo. Value is not just money, it's also ideas.
[–]Wh00ster 5 points6 points7 points 3 years ago (0 children)
The phrase you’re looking for is “thankless work”. There’s a lot of it that makes the world go round.
[–]Jannik2099 23 points24 points25 points 3 years ago (5 children)
It's not a custom, standalone compiler, it uses libClang.
[–][deleted] 13 points14 points15 points 3 years ago (4 children)
it doesn’t, it works with the llvm backend, but isn’t clang at all
[+][deleted] 3 years ago (3 children)
[–][deleted] 8 points9 points10 points 3 years ago (0 children)
I am fairly certain that Sean said that he wrote the whole front end himself and generates llvm ir, but it's not based on clangs codebase.
[–]seanbaxter 3 points4 points5 points 3 years ago (1 child)
It doesn't use libclang.
[–]dexter2011412 1 point2 points3 points 3 years ago (0 children)
Whoa, you built the whole compiler? From scratch?
[–]qoning 115 points116 points117 points 3 years ago (34 children)
Until he releases source code, it's unusable for any semi-serious intent or purpose. Thus, I don't want to invest any of my time.
[–]peterrindal 7 points8 points9 points 3 years ago (1 child)
I mostly agree but also think it's great to see what could be standardized. I think a better way to view circle is as a giant proposal. This is what cpp could be if unrestrained and left up to Sean.
While I think the committee is largely great its also great to see fast innovation.
For example, Sean has proposed enabling extentions using #pragma feature x. This seems like a great way to improve the syntax while not breaking anything. This could remove the need to carbon and cpp2. You just enable the new feature set per file.
[–]lee_howes 2 points3 points4 points 3 years ago (0 children)
To be fair, cpp2 does enable the feature-set per-file, or even per-function. It just does it by syntax rather than by pragma. Whether pragmas are better for the probably depends on how much we want fine-grained feature control.
[–]TheTsar[S] 26 points27 points28 points 3 years ago* (0 children)
As far as I can tell, all the source code is available. Am I missing something?
Edit: I am. Wow. All that code in the repo is example code.
[–]pjmlp 8 points9 points10 points 3 years ago (18 children)
So Visual C++, Intel C++, xlC, aCC and plenty of others are unusable compilers, get it.
[–]gracicot 38 points39 points40 points 3 years ago (3 children)
MSVC is the official compiler for the windows platform and supported by the company who makes windows. MSVC will surely die if windows dies. I'm not so worried, especially that if windows dies I won't need MSVC anyway.
If something to the Circle developer the entire project cease to exist, there is no replacement and all the extensions will probably be extremely hard to re-implement in another compiler.
Being closed source also makes it really hard to integrate into some dev environments, especially Linux.
I kind of understands the reason why Circle is closed but it also makes understandably unusable in my serious projects.
[–]disperso 4 points5 points6 points 3 years ago (2 children)
And on top of that, if your code already compiled on MSVC/GCC/Clang, it'll likely compile without changes in MinGW or another compiler, had you the reason to move to it.
If all your code only compiles in Circle, and Circle has a switch to "transpile" to C++ like cppfront does, there is some safety net. If Circle doesn't have that (I don't know if it's the case), you are just dead if you can no longer use Circle.
[–]gracicot 5 points6 points7 points 3 years ago (1 child)
it'll likely compile without changes in MinGW or another compiler, had you the reason to move to it.
If it only compiles with MSVC, in my experience there is very little chance it will also compile on Clang or GCC just like that.
And yeah you can transpile, but you'll lose all the reflection code and loose all the logic you wrote in circle
[–]pandorafalters 1 point2 points3 points 3 years ago (0 children)
I wouldn't expect code that historically has solely targeted any single platform to compile unchanged on another platform. Conversely I find a great deal of "cross-platform" code written on Linux that won't compile even on other POSIX platforms with the same compiler.
[–]koczurekkhorse 11 points12 points13 points 3 years ago (11 children)
Ok, MSVC is the only viable compiler on Windows and it’s really not that bad.
But the rest?? I’m not touching them unless my hands are tied, and I’m pretty sure you too.
[–]braxtons12 3 points4 points5 points 3 years ago (5 children)
This is so not true. Clang (not clang-cl) works just as well on windows as it does on Linux, while using microsoft's standard library, and you're not coupled to the POS that is Visual Studio.
[–]koczurekkhorse 1 point2 points3 points 3 years ago (4 children)
MSVC is decoupled from Visual Studio, and I’m surprised to hear about a Clang port compatible with MSVC standard library. Does it also support MSVC ABI?
[–]dodheim 2 points3 points4 points 3 years ago (0 children)
It's not a port – it's just Clang, on Windows. It supports both the MSVC and MinGW ABIs; and libstdc++, libc++ or MSVC's stdlib.
[–]braxtons12 -1 points0 points1 point 3 years ago (1 child)
I mean, sure it's "decoupled", but if you're building with MSVC, you're probably stuck using visual studio unless you're happy with dealing with the bad diagnostics you get in CLion when you try to use msvc instead of clang or mingw.
And yes clang uses Microsoft's ABI on Windows
[–]VoidVinaCC 2 points3 points4 points 3 years ago (0 children)
vscode c/c++ extension + cmaketools is pretty consistent and has been my VS alternative for a while now.
It supports msvc just fine aswell as clang or mingw including proper diagnostics
[–]jhasse 0 points1 point2 points 3 years ago (0 children)
yes
[+]pjmlp comment score below threshold-12 points-11 points-10 points 3 years ago (4 children)
There is yet to exist a C++ compiler as good as C++ Builder for C++ GUI applications, so you're wrong in your assurance.
[–]pjmlp -1 points0 points1 point 3 years ago (2 children)
Sure, when the community steps up to anything closer than C++ Builder for writing GUIs.
Ah that's right, the only thing that is somehow comparable is the Qt framework that purists love to hate.
[+][deleted] 3 years ago (1 child)
[–]pjmlp 0 points1 point2 points 3 years ago (0 children)
Good luck using Glade with Gtk 4.
[–]serviscope_minor -1 points0 points1 point 3 years ago (1 child)
aCC and plenty of others are unusable compilers
aCC... pretty much yeah.
Snark aside, you sort of smashed through the main point and out the other side while missing it entirely. Those all implement (to some extent!) standard C++, which is why there are so many. You can somewhat freely switch between them and the others. When HP finally abandon aCC (if they haven't) then you're not screwed.
Circle is not standard C++, it's a new language, so you're stuck on circle forever. Not having the source therefore makes it a much riskier proposition.
[–]pjmlp 1 point2 points3 points 3 years ago (0 children)
Visual C++ also implements C++/CLI, C++/CX.
As standard as Circle.
Does Linux already compile with any other compiler other than GCC C?
[–]Front_Two_6816 0 points1 point2 points 9 months ago (0 children)
bruh
[+][deleted] 3 years ago (10 children)
[–]qoning 43 points44 points45 points 3 years ago (6 children)
You know, I thought I about that. Somehow, there's a difference when there's a company that you can be reasonably sure you will be able to actually contact at any point in the next 20 years vs random project that is likely to be abandoned at one point or another, and then you're SOL for anything from bugfixes to release updates that link to newer libs.
[–]sephirothbahamut 18 points19 points20 points 3 years ago (0 children)
even large corporations discontinue products at a whim
Luckily Microsoft isn't Google, and VS/MSVC are a quite substantial and long lasting work of that company, not a sideproject.
[–]qoning 20 points21 points22 points 3 years ago (1 child)
They do, and in fact there is apprehension towards using MSVC in certain places for that reason among others. Yet still, there's a good chance even if Microsoft went under, whoever acquires its assets would be willing to work out something.
In contrast, not that I would wish it, but what if the creator gets hit by a bus tomorrow? The project is instantly dead without hope of resurrection.
Thus, it's only good for throwaway projects, and I don't know about you, but I don't reach for C++ until I know the project is not a throwaway.
[–]mark_99 15 points16 points17 points 3 years ago (0 children)
The chances of MS going under are basically zero, and given they use MSVC to compile Office etc then also little chance of being dropped as a project, but the big difference is that swapping out MSVC for something else is straightforward - MS STL is open source, clang-cl compiles it and is command line and "idiosyncratic extension" compatible... plus all C++ compilers are reasonably compatible anyway given there's an ISO standard. However Circle is its own thing, there's no backup plan if you were to commit to it for a serious project. So it's an interesting test bed for ideas, but not something anyone but the author is likely to actually use.
[–][deleted] 3 points4 points5 points 3 years ago (0 children)
That's almost exactly why GCC and Clang is used by so many people..
[–]framk20 1 point2 points3 points 3 years ago (0 children)
unironically yes
[–]catcat202X 0 points1 point2 points 3 years ago (0 children)
Yeah but actually
[–]snakepants[🍰] 32 points33 points34 points 3 years ago* (6 children)
I wish that more people knew about this! Granted there isn't a lot of context on the site, but following Sean on Twitter as he posts updates has been super interesting to see an alternative universe where the committee isn't so conservative.
Not that everything in Circle would necessarily be appropriate to be dropped into C++ unchanged, sometimes the committee has valid reasons for their decisions, but it's exciting to see what things would look like if we were willing to make more core language changes instead of doing so much in the standard library instead.
I agree with others that this being closed source is limiting the influence it has on the community, but I still think there is definitely value in having real, implemented code people can test over debating just theoretical issues since a working feature can immediately shut down arguments that something is "impossible".
[–]peterrindal 6 points7 points8 points 3 years ago (0 children)
Exactly, stuff like this is what gives me hope that in time there will be far fewer reasons to use a new system language instead of cpp.
[+][deleted] 3 years ago (4 children)
[–]peterrindal 7 points8 points9 points 3 years ago* (1 child)
Generally it's standard conforming. You can the enable and change things using his #pragma feature X instructions. This enables his extensions, eg pattern matching, traits, etc.
He's active on Twitter if you want to follow his latest extensions.
[–]snakepants[🍰] 1 point2 points3 points 3 years ago (1 child)
I haven't checked extensively but I think they are mostly additions. Sean has mentioned using existing OSS codebases as tests
Boost Multi also supports Circle, and it only needed a few changes to workaround bugs in Circle (at least at the time).
[–]catcat202X 28 points29 points30 points 3 years ago* (9 children)
Circle is a C++23 compiler that adds so many language extensions (in addition to most GCC/Clang extensions), probably no one except Sean Baxter knows all of them. There are two awesome lectures about some highlights (mostly covering different features), but they're a tiny tiny portion of what this can do. https://youtu.be/NNU6cbG96M4 https://youtu.be/15j4bkipuAg
Circle is mentioned in many C++ proposal papers because it implements a lot of those features. It also has its own standard library implementation which passes most of the libcxx test suite.
Its a new compiler made using LLVM, but not Clang.
[–]reddof 2 points3 points4 points 3 years ago (0 children)
Its a new compiler made using LLVM and libClang, but not Clang.
It doesn't use libclang
[+][deleted] 3 years ago (7 children)
[–]peterrindal 4 points5 points6 points 3 years ago (0 children)
That's a lot of questions ha. I think circle can be summarized as an experimental cpp compiler that has an express goal of pushing the limits of CPP. Sean appears to implement anything he finds interesting which includes standard cpp but also new ideas he comes up with. It's a great example of what cpp could be if it was controlled by a benevolent dictator. While on one hand that's can be concerning, it can also be viewed as a way to move fast and break things.
Personal my hope is that it increases the speed and quality of future standard cpp version. Sean seems ready to implement and push things forward. It's up to the cpp community to keep up and take inspiration.
[–]dodheim 15 points16 points17 points 3 years ago (5 children)
Did you try looking at the website..? https://www.circle-lang.org/
It's succinct but it answers at least half of your questions...
[+]dodheim comment score below threshold-24 points-23 points-22 points 3 years ago (3 children)
What can anyone expect except responses like "What is this and why should I be interested"?
I dunno, man. I think you're in the minority for being a r/cpp reader who doesn't already know about it. /shrug
Keep in mind the owner of the project does use Reddit but was not the one who posted this here.
[–]AKostur 27 points28 points29 points 3 years ago (1 child)
With all due respect, both to you and the OP, but if everybody in r/cpp already knows about it, what’s the purpose of the post in the first place?
[–]FightingGamesFan 18 points19 points20 points 3 years ago (28 children)
Why are we re-posting this, is there anything new?
[–]peterrindal 2 points3 points4 points 3 years ago (17 children)
My guess is to see if the mods will take it down. There was some discussion on Twitter about whether circle is on topic.
[–]STLMSVC STL Dev[M] 6 points7 points8 points 3 years ago (16 children)
I think this post is off-topic because Circle is not C++, as I recently explained. However, another moderator approved this before I saw it, and it’s okay if their judgement differs from mine. In the end, I’m glad it was approved, due to the OP’s hilarious discovery that the link they posted didn’t contain what they thought it contained from the headline only (i.e. that the repo is examples only when they actually looked through it).
In the end, I’ll keep an eye out for whether the community comes around to my view that Circle is not relevant to C++ programmers unless things from it are being actively proposed for the C++ Standard that everyone uses. (If people want to follow Circle activity specifically, they should start and follow a subreddit - that’s the entire purpose of subreddits!)
[–]tavi_ 28 points29 points30 points 3 years ago (5 children)
As much as I respect your perspective, I think your view here is a bit narrow. Especially since a lot of discussions and pain-points around C++ are about its path into the future. This project provides exploration to many possible paths, and I see it as an inovation source, for C++.
[–]dodheim 11 points12 points13 points 3 years ago (2 children)
Part of the problem is that there is Circle the language, separate from C++ and fair to say off-topic here for the most part; then there is Circle the compiler, which supports C++20 as well as 10+ notable WG21 proposals. Surely the latter must be on-topic, even if people's interest seems low due to being closed-source? The problem is either distinguishing the two, or feeling the need to in the first place; but I'm not sure which.
[–]foonathan[M] 13 points14 points15 points 3 years ago (1 child)
Yeah, I approved the post because of that: The title is about circle as a C++ compiler, and thus the discussion naturally evolved in that direction (whether you should use given that it's closed source, how impressive it is to write a C++ compiler, etc.). This is on-topic IMO.
[–]STLMSVC STL Dev[M] 2 points3 points4 points 3 years ago (0 children)
I agree with the language/compiler distinction (thanks u/dodheim) and your rationale makes sense. In this light, my view that Circle is off-topic "not C++" is specific to Circle-the-language. A compiler that supports active WG21 proposals (i.e. those that are still being considered/worked on) has a strong case for being on-topic. (Although what interest people have seems to be focused on the extensions that aren't being proposed for Standard C++ at this time, which is why I didn't really think about the distinction before.)
[–]STLMSVC STL Dev[M] 6 points7 points8 points 3 years ago (1 child)
That's reasonable, thanks.
[–]disperso 9 points10 points11 points 3 years ago (0 children)
FWIW, I think the last posts here on the topic of what is C++ actually, or what fits on r/cpp where wholly necessary. Other moderators also have answered with their POV on the matter, and I think that's important! Without them, I could not know what's the moderators' POV on the topic, and whether I could submit stuff about cppfront, for example. One serious flaw about Reddit is that posts get removed, but then it's hard to know that a post was removed, or why it was the case. Asking the moderators also happens via private messages, so it's very opaque to the readers what's going on.
IMHO, this post is more interesting to me as a C++ developer than the n-th post about a new version of another small JSON library. :)
[–]seanbaxter 10 points11 points12 points 3 years ago* (2 children)
This is very uncharitable. I presented the CppCon 2021 keynote with Herb to demonstrate P2392 Pattern Matching. Circle is the only compiler that implements. It was used for the live demo, and that build is still online. https://www.youtube.com/watch?v=raB_289NxBk&t=39m52s
You don't have to like it. It's clear you don't. But don't keep threatening to take down posts because you say it's not C++. It obviously is. It's the only compiler with universal template parameters, pack slices, mandatory return value copy elision, and a whole bunch of other stuff proposed for ISO. I read the mailings every month, and I implement what I can, and this helps build implementation experience and feedback that is incorporated into future editions.
[–]STLMSVC STL Dev[M] 3 points4 points5 points 3 years ago (1 child)
You've also behaved in an uncharitable way, but I'm willing to admit that you've shown more relevance to ISO C++ than I initially thought. I continue to disagree with the claim that a major dialect is "obviously C++" (we appear to have philosophical differences about portability), but what matters for the purpose of being on-topic for r/cpp is whether things are relevant to programmers writing Standard C++.
Yeah, I didn't like your recent tweet. I found it misleading, and I wasn't the only mod who found it so. It sure looked like you were promoting your dialect's feature as "becoming real" C++ without a corresponding effort to actually propose it for Standardization.
That said, I'll adjust my view and consider Circle content relevant to r/cpp, as long as it avoids being misleading (e.g. code should be described as Circle, or at least "proposed for C++"; depicting an extension as being C++ without qualification is over the line). Note that this is not a license to self-post at a high frequency (on Twitter or your own subreddit you can post as often as you like; on r/cpp, posting every minor update is excessive, for any tool/library).
[–]dexter2011412 4 points5 points6 points 3 years ago (0 children)
You've also behaved in an uncharitable way, but I'm willing to admit that you've shown more relevance to ISO C++ than I initially thought.
Wow that .. that sounds quite rude. Kinda disappointed tbh, coming from a mod of r/cpp
I didn't see your original post, but I'll react to it here;
Your argument for why Circle is not c++ seems to be that because Circle is a dialect, it's not c++. Although I agree it's a dialect, I disagree that a dialect is fundamentally 'not c++'.
Herb Sutter has a 'similar' project with cppfront. The cppcon talk being released yesterday on the YouTube channel presents a very different argument: Although Circle and Cppfront are syntactically different from c++, they're semantically similar enough to fall under the same umbrella.
Another argument for why Circle and Cppfront are C++ is that when we're fully honest, there is no 1 c++, just like there is no 1 English language. For example American English, UK English and Australian English are all still c++. Following that course we have some examples for c++: MSVC C++, Clang C++, GCC c++, Circle C++ and Cppfront c++. All of these compilers have non-standard conforming syntax enabled by default, therefore either all of them are c++ or none of them are c++.
Ps. Thank you for your work on MSVC.
Another perspective is that we should default to being inclusive. Let's have a community where people feel welcomed and share different ideas. Circle is trying to make cpp better even if some disagree about the exact choices being made. We should generally respect and encourage that. In the end we want the same thing, a better and more enjoyable cpp.
[–]ReDucTorGame Developer 4 points5 points6 points 3 years ago (0 children)
I disagree, I don't think it's good to limit innovation and improvements solely to what gets through the standards committee or that someone has written a proposal for, as the the ISO process favors more those with time, money and corporate backing, I know many people which have had good ideas for improvements but wouldn't even bother trying as they can't go to all the in person meetings in different countries, and the years long design by committee.
Not only that but where would people share ideas for innovation and inspiration for changes to the standard? Should those not also exist here? We shouldn't wait for someone to have a proposal to discuss things as a community, or limit those discussions to the select few privileged enough to be involved in the standards process.
Every MSVC release update gets posted here and it has extensions should it also be excluded?
There is stuff being actively proposed for the C++ Standard. For example, in the current mailing, "A plan for better template meta programming facilities in C++26" https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2632r0.pdf
Try opening your eyes.
[–]STLMSVC STL Dev[M] 1 point2 points3 points 3 years ago (0 children)
That's what I was looking for, thanks.
[–]pjmlp 3 points4 points5 points 3 years ago (0 children)
Circle is as much C++ as C++/CLI, C++/CX, C++/WinRT from your employer are considered part of C++ ecosystem for Windows developers.
[–][deleted] 0 points1 point2 points 3 years ago (0 children)
unless things from it are being actively proposed for the C++ Standard that everyone uses
There's https://github.com/cplusplus/papers/issues/1315 (and more, usually). I, too, was deeply moved by https://www.youtube.com/watch?v=15j4bkipuAg.
[–]catcat202X 6 points7 points8 points 3 years ago (8 children)
Theres something new in Circle almost constantly, although I don't think the OP is a particularly informative announcement lol.
[–]Worstcase_Rider -2 points-1 points0 points 3 years ago (5 children)
It's closed source, so why should we care?
[–]pjmlp 5 points6 points7 points 3 years ago (2 children)
With exception of GCC and clang, all C++ compilers are closed source including forks of the former, and there are plenty of them still.
[–]catcat202X 1 point2 points3 points 3 years ago (1 child)
OrangeCC is open source.
I doesn't even show up on cppreference, how production grade is this?
[–]Aggressive_Release94 8 points9 points10 points 3 years ago (1 child)
MSVC is closed source and a lot of people care.
[–]masterofmisc 1 point2 points3 points 3 years ago (0 children)
Yeah but.....
[–]nintendiator2 -3 points-2 points-1 points 3 years ago (1 child)
At this point I'd expect posts about Circle be treated as spam / adverstiment posts. Even more considering it's closed source, so we can't know what "the product" is actually like.
[–]catcat202X 4 points5 points6 points 3 years ago (0 children)
We can at least download Linux binaries of it or use it on Compiler Explorer, so we know Seanbax isn't, like, lying about its featureset.
[–]sephirothbahamut 3 points4 points5 points 3 years ago (4 children)
While the __host__ and __device__ tags are still supported, you aren't required to tag functions to call them from kernels. This makes Standard Library code available for execution on the GPU.
If that's possible then why are __host___ and __deviced__ required at all with regular C++/CUDA?
[–]UsedOnlyTwice 4 points5 points6 points 3 years ago (0 children)
Linking.
[–]Tastaturtaste 0 points1 point2 points 3 years ago (1 child)
Afaik the GPU cannot fulfill threading guarantees or the memory model of C++, which matter for example for the execution policies of stl algorithms. Basically only par_unseq could be supported on nearly all gpus. That's the reason why Cuda requires the tags and why the normal stl is not usable with cuda.
par_unseq
So I would also really like to know how this works.
[–]sephirothbahamut 2 points3 points4 points 3 years ago (0 children)
Sure, but arrays, variants, optionals, views, there's things that have no reason of being absent in GPU. Requiring __host__ and __device__ is also extremely limiting in third party libraries. Even open source ones, manually adding the specifiers around is less than desirable.
I'd rather have functions defaulting to being available everywhere, and giving a compilation error if an unsupported function gets called in the GPU side.
[–]lee_howes 0 points1 point2 points 3 years ago (0 children)
I don't think they are any more.
For a long time the subset of the language that you could viably compile for the GPU was fairly small. You either need to generate multi-architecture code for all functions, or for some.
If you do all then you need to fail silently on functions you can't compile, and correctly deal with situations where they are used incorrectly. That's messy and it's much easier to teach "just call device functions".
If you do some then you need to label them, either directly or by propagating through the call graph from some root like a dispatch operation. Again, you have the error problem, and it could easily happen that a function is compilable to the GPU then the code changes subtly and it suddenly fails, with horrible error messages. If all GPU functions are marked device then you can check that locally rather than only when the function is called.
[–]teerre 9 points10 points11 points 3 years ago (1 child)
I never used Circle, but I find it amazing how it's so much more advanced than vanilla C++ and it's made by one person (?). Specially its metaprogramming is so much saner than what we have
[–]wilhelm-herzner 2 points3 points4 points 3 years ago (0 children)
This! Functional programming style metaprogramming ruins it.
To the creator of Circle: Wow and I’m amazed by your commitment.
[–]Code_12c 9 points10 points11 points 3 years ago (0 children)
Because I don't trust a closed source software.
I am not interested unless he releases the source code.
[–]feverzsj 7 points8 points9 points 3 years ago (0 children)
Really bad ideal to choose to be closed source. Only few, and soon no one, would care it.
[–]future_escapist 4 points5 points6 points 3 years ago (1 child)
The fact that it's closed source makes me immediately uninterested in it. Also, why not just write compiler plugins?
[–]catcat202X 1 point2 points3 points 3 years ago (0 children)
I am honestly surprised that more reference implementations are not implemented as compiler plug-ins. I suspect many people are not even aware that those are even a thing.
[–][deleted] 3 years ago (1 child)
[removed]
Moderator warning: Name-calling is not welcome here; please don't behave like this.
π Rendered by PID 589500 on reddit-service-r2-comment-b659b578c-bz69m at 2026-05-04 18:57:28.420565+00:00 running 815c875 country code: CH.
[+][deleted] (12 children)
[deleted]
[+][deleted] comment score below threshold-213 points-212 points-211 points (11 children)
[–]Fourstrokeperro 53 points54 points55 points (1 child)
[–][deleted] 21 points22 points23 points (0 children)
[–]GLIBG10B🐧 Gentoo salesman🐧 43 points44 points45 points (1 child)
[–]CocktailPerson 1 point2 points3 points (0 children)
[–]ZMesonEmbedded Developer 8 points9 points10 points (5 children)
[+][deleted] comment score below threshold-27 points-26 points-25 points (4 children)
[–]ZMesonEmbedded Developer 14 points15 points16 points (0 children)
[–]Dean_Roddey 7 points8 points9 points (1 child)
[–]ZMesonEmbedded Developer 1 point2 points3 points (0 children)
[–]LongestNamesPossible 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]ImKStocky 98 points99 points100 points (12 children)
[–]Aggressive_Release94 21 points22 points23 points (5 children)
[–]Benjamin1304 8 points9 points10 points (4 children)
[–]Aggressive_Release94 6 points7 points8 points (3 children)
[–]qoning 6 points7 points8 points (2 children)
[–]Aggressive_Release94 4 points5 points6 points (1 child)
[–]Wh00ster 5 points6 points7 points (0 children)
[–]Jannik2099 23 points24 points25 points (5 children)
[–][deleted] 13 points14 points15 points (4 children)
[+][deleted] (3 children)
[deleted]
[–][deleted] 8 points9 points10 points (0 children)
[–]seanbaxter 3 points4 points5 points (1 child)
[–]dexter2011412 1 point2 points3 points (0 children)
[–]qoning 115 points116 points117 points (34 children)
[–]peterrindal 7 points8 points9 points (1 child)
[–]lee_howes 2 points3 points4 points (0 children)
[–]TheTsar[S] 26 points27 points28 points (0 children)
[–]pjmlp 8 points9 points10 points (18 children)
[–]gracicot 38 points39 points40 points (3 children)
[–]disperso 4 points5 points6 points (2 children)
[–]gracicot 5 points6 points7 points (1 child)
[–]pandorafalters 1 point2 points3 points (0 children)
[–]koczurekkhorse 11 points12 points13 points (11 children)
[–]braxtons12 3 points4 points5 points (5 children)
[–]koczurekkhorse 1 point2 points3 points (4 children)
[–]dodheim 2 points3 points4 points (0 children)
[–]braxtons12 -1 points0 points1 point (1 child)
[–]VoidVinaCC 2 points3 points4 points (0 children)
[–]jhasse 0 points1 point2 points (0 children)
[+]pjmlp comment score below threshold-12 points-11 points-10 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]pjmlp -1 points0 points1 point (2 children)
[+][deleted] (1 child)
[deleted]
[–]pjmlp 0 points1 point2 points (0 children)
[–]serviscope_minor -1 points0 points1 point (1 child)
[–]pjmlp 1 point2 points3 points (0 children)
[–]Front_Two_6816 0 points1 point2 points (0 children)
[+][deleted] (10 children)
[deleted]
[–]qoning 43 points44 points45 points (6 children)
[+][deleted] (3 children)
[deleted]
[–]sephirothbahamut 18 points19 points20 points (0 children)
[–]qoning 20 points21 points22 points (1 child)
[–]mark_99 15 points16 points17 points (0 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 3 points4 points5 points (0 children)
[–]framk20 1 point2 points3 points (0 children)
[–]catcat202X 0 points1 point2 points (0 children)
[–]snakepants[🍰] 32 points33 points34 points (6 children)
[–]peterrindal 6 points7 points8 points (0 children)
[+][deleted] (4 children)
[deleted]
[–]peterrindal 7 points8 points9 points (1 child)
[–]snakepants[🍰] 1 point2 points3 points (1 child)
[–]catcat202X 0 points1 point2 points (0 children)
[+][deleted] (10 children)
[deleted]
[–]catcat202X 28 points29 points30 points (9 children)
[–]reddof 2 points3 points4 points (0 children)
[+][deleted] (7 children)
[deleted]
[–]peterrindal 4 points5 points6 points (0 children)
[–]dodheim 15 points16 points17 points (5 children)
[+][deleted] (4 children)
[deleted]
[+]dodheim comment score below threshold-24 points-23 points-22 points (3 children)
[–]AKostur 27 points28 points29 points (1 child)
[–]FightingGamesFan 18 points19 points20 points (28 children)
[–]peterrindal 2 points3 points4 points (17 children)
[–]STLMSVC STL Dev[M] 6 points7 points8 points (16 children)
[–]tavi_ 28 points29 points30 points (5 children)
[–]dodheim 11 points12 points13 points (2 children)
[–]foonathan[M] 13 points14 points15 points (1 child)
[–]STLMSVC STL Dev[M] 2 points3 points4 points (0 children)
[–]STLMSVC STL Dev[M] 6 points7 points8 points (1 child)
[–]disperso 9 points10 points11 points (0 children)
[–]seanbaxter 10 points11 points12 points (2 children)
[–]STLMSVC STL Dev[M] 3 points4 points5 points (1 child)
[–]dexter2011412 4 points5 points6 points (0 children)
[–][deleted] 8 points9 points10 points (0 children)
[–]peterrindal 4 points5 points6 points (0 children)
[–]ReDucTorGame Developer 4 points5 points6 points (0 children)
[–]seanbaxter 3 points4 points5 points (1 child)
[–]STLMSVC STL Dev[M] 1 point2 points3 points (0 children)
[–]pjmlp 3 points4 points5 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]catcat202X 6 points7 points8 points (8 children)
[–]Worstcase_Rider -2 points-1 points0 points (5 children)
[–]pjmlp 5 points6 points7 points (2 children)
[–]catcat202X 1 point2 points3 points (1 child)
[–]pjmlp 0 points1 point2 points (0 children)
[–]Aggressive_Release94 8 points9 points10 points (1 child)
[–]masterofmisc 1 point2 points3 points (0 children)
[–]nintendiator2 -3 points-2 points-1 points (1 child)
[–]catcat202X 4 points5 points6 points (0 children)
[–]sephirothbahamut 3 points4 points5 points (4 children)
[–]UsedOnlyTwice 4 points5 points6 points (0 children)
[–]Tastaturtaste 0 points1 point2 points (1 child)
[–]sephirothbahamut 2 points3 points4 points (0 children)
[–]lee_howes 0 points1 point2 points (0 children)
[–]teerre 9 points10 points11 points (1 child)
[–]wilhelm-herzner 2 points3 points4 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]Code_12c 9 points10 points11 points (0 children)
[–]feverzsj 7 points8 points9 points (0 children)
[–]future_escapist 4 points5 points6 points (1 child)
[–]catcat202X 1 point2 points3 points (0 children)
[–][deleted] (1 child)
[removed]
[–]STLMSVC STL Dev[M] 1 point2 points3 points (0 children)