- [OT]: Starting the .NET Open Source Revolution - 1 Update
- OT: Github - 1 Update
- Learning modern C++, where to start? - 3 Updates
- So full of .. - 1 Update
- Such a cute couple (Was: How much different is it to insist that "C is not a high level assembler" vs. insisting the God shit (Was: if cargo blocks)) - 2 Updates
- Learning modern C++, where to start? - 1 Update
"😉 Good Guy 😉" <Hello.World@Example.com>: Jan 12 10:27PM > there now and Scott looks back on those early challenges with a smile. > This is his story of the first successful open source project at > Microsoft and how it paved the way to where they are today./ <*https://medium.com/microsoft-open-source-stories/starting-the-net-open-source-revolution-e0268b02ac8a*> -- With over 950 million devices now running Windows 10, customer satisfaction is higher than any previous version of windows. |
woodbrian77@gmail.com: Jan 12 02:21PM -0800 > ------------- > Or maybe there's another company that has better > C++ support? Thanks. Now I'm trying Appveyor. It says: The build phase is set to "MSBuild" mode (default), but no Visual Studio project or solution files were found in the root directory. If you are not building Visual Studio project switch build mode to "Script" and provide your custom build command. ------------------------------------------------- I've changed the build mode to "Script" but haven't figured out how to provide a custom build command. I'm thinking my build command could be: make -f makefile.vs . I'm not sure if I'll need to check a file in or just tell the Appveyor gui. Thanks in advance. Brian Ebenezer Enterprises http://webEbenezer.net |
sten.unto@gmail.com (Unto Sten): Jan 12 03:26PM > Well, it seems you have missed the point that a lambda does not create a > function, but rather a functor with a potentially rich data state. Okay, I have to study more about lambdas. Could you refer to some C++ example code that demonstrates the functor property of lambda functions? > This is the same difference what a class has over a free function, so in > some sense similar to one of the key differences of C and C++. I see. > OTOH, there are many people who think C and C++ are the same > language, so maybe that's not so big deal as I think... Yes, it is admittedly pretty annoying to read job requirements such as: * need to know C/C++ Of course C language is *almost* a subset of C++, and in that sense C counts as valid C++ as well, but the differences are huge. So I think that the expression "C/C++" is very confusing. Best regards, Unto Sten |
sten.unto@gmail.com (Unto Sten): Jan 12 05:34PM > He might refer to the lambda being a closure, > i.e., having bindings to its environment. Yes, that's what I thought, too. I have seen closure examples using lambda functions, but have been unable to see what's the actual benefit of using closures in the first place. The following article provides some insight using JavaScript, but I am still a bit shaky about this: https://medium.com/@dis_is_patrick/practical-uses-for-closures-c65640ae7304 Best regards, Unto Sten |
Paavo Helde <myfirstname@osa.pri.ee>: Jan 12 10:50PM +0200 On 12.01.2019 17:26, Unto Sten wrote: > Okay, I have to study more about lambdas. Could you refer to some > C++ example code that demonstrates the functor property of lambda > functions? The simplest example: find an element in a vector not equal to x. int x = 42; std::vector<int> v= ...; auto p = std::find_if(v.begin(), v.end(), [x](int y){return x!=y;}); Note passing the data to lambda via [x]. If it were [&x] then it would just store a reference to the original x. This would make a difference if the lambda is passed over to another thread or stored for later use, for example. Note that std::find_if does not know or care about x, it just (potentially) copies and invokes the lambda. An extract from real production code: // Parallelize over 2D planes of a 3D array CubeParallelizer2 parallelizer(ctx.GetEngine(), dims); parallelizer.PlaneLoop(ctx, [this, dims, &sourcePlanePointers, &maskPlanePointers, &pHess1, &pHess2, &pHess3, &pNegTrace, sourceType, resultType] (dimsize_t z) { Run3DPlane( z > 0 ? sourcePlanePointers[z - 1] : nullptr, sourcePlanePointers[z], z < dims[2] - 1 ? sourcePlanePointers[z + 1] : nullptr, dims[0], dims[1], maskPlanePointers[z], pHess1[z], pHess2[z], pHess3[z], pNegTrace[z], sourceType, resultType ); }); Here a lambda is passed over to parallel worker threads, with some bound data passed by reference and some by value. Note that the parallelizing infrastructure (parallelizer.PlaneLoop()) does not know or care about the bound data, it just copied and invokes the lambda. Note also how the bound data and the explicit parameter z are combined for selecting the data to use in the other thread. |
sten.unto@gmail.com (Unto Sten): Jan 12 07:58PM > It is the enemy (Satan) at work in deceived sinners, doing > his will in them as they are unaware due to sin's effect > on people. Rick, religion has made a moron out of you. For years you have polluted technical, programming-related newsgroups with spam messages that are full of outdated, delusional ideas based on the Bible. The Bible is actually one of the worst books ever written. It consists of several contradictory smaller "books" written by ignorant men thousands of years ago. The Bible contains intolerance, racism, homophobia, and general beliefs that are no more credible than fairy tales about Santa Claus. The only difference is that people usually stop believing in Santa Claus at an early age. But with Jesus-related delusions, the false beliefs often last for a full life-time. This is because many societys are nowadays pushing Jesus-related propaganda to the members of the society. Many people believe the Church's and priests' lies. We have hundreds of different churches and sects, all claiming to be the "really correct". It is one of the worst features of the United States that it is pretty full of religious wackos, but as far as I know, the situation is getting a bit better. I recently came across a study according to which the young Americans are less religious than their parents. Owing to the Internet, I suppose this healthy trend will continue. Rick, all I can do is hope that you will be free of biblical delusions one day. It takes a lot of soul-searching and honest effort from you, but it *is* doable. But you are in *way deep*, that is clear. If you cannot transition to agnosticism or atheism, please keep "some kind of belief in some kind of God" if it helps you to retain some kind of sanity. But definitely you should free yourself of organized religion such as christianity and stop spamming these newsgroups. As of now, you are not at all mentally stable, you are a wacko. Religion has molded an arrogant bastard out of you, and that is why you think you are "helping" people here when in reality you are only filling technical newsgroups with unwanted, crazy, outdated, delusional christian spam. Best regards, Unto Sten |
David Brown <david.brown@hesbynett.no>: Jan 12 06:33PM +0100 On 11/01/19 17:20, Kenny McCormack wrote: > different nonsense, via the same methods. Among other things, your > Trumpian, supreme, unshakable confidence in your own infallibility. > Such a cute couple you'd make... Did I understand you correctly? You think "C is a high level language, not an assembly language" is a wacko idea? Are you sure you are in the right newsgroup? Are you sure you are on the right planet? I can understand that some people would /prefer/ C to be a sort of "high level assembler" - that's a matter of opinion. I can understand that some people try to use it that way, and that some people think that was what it used to be - those are mistakes made from ignorance and misunderstanding. |
fir <profesor.fir@gmail.com>: Jan 12 11:25AM -0800 W dniu sobota, 12 stycznia 2019 18:26:11 UTC+1 użytkownik David Brown napisał: > assembler" - that's a matter of opinion. I can understand that some > people try to use it that way, and that some people think that was what > it used to be - those are mistakes made from ignorance and misunderstanding. lol, imo you get into realm of lies here.. maybe its your ignorance? c was intendet to give a control on machine resources (two famous of them - (b)its and (c)ycles) |
ram@zedat.fu-berlin.de (Stefan Ram): Jan 12 04:18PM >Okay, I have to study more about lambdas. Could you refer to some >C++ example code that demonstrates the functor property of lambda >functions? He might refer to the lambda being a closure, i.e., having bindings to its environment. main.cpp #include <iostream> #include <ostream> template< typename T >void invoke( T const f ){ f(); } int main() { auto environment = 0; auto lambda =[ & ](){ ++environment; }; invoke( lambda ); ::std::cout << environment << '\n'; } transcript 1 In Church's lambda calculus a corresponding example might not be possible, because it has no mutable objects. |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment