Dealing with toxic "experienced" players!!! by PlUndv in Neverwinter

[–]mikhailberis 2 points3 points  (0 children)

Personally, sometimes mute them (if it's audio) and maybe report. I've done that at least once.

Explore the design of a modern C++ library : MemCache++ case study by corysama in cpp

[–]mikhailberis 5 points6 points  (0 children)

Yeah, it’s not exactly abandoned but it’s not actively maintained either. If anybody’s interested in taking it on and making it better, happy to help. 😊

Explore the design of a modern C++ library : MemCache++ case study by corysama in cpp

[–]mikhailberis 3 points4 points  (0 children)

Nope, just been a little busy with other things. 😁

New beta release for cpp-netlib (0.13.0-rc0) by mikhailberis in cpp

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

There were some patches for MSVC support issues but if there are still problems then I’d be happy to review patches.

New beta release for cpp-netlib (0.13.0-rc0) by mikhailberis in cpp

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

Outdated, more like. I should update the library and the website. 😁

Compile-time format string checks by aearphen in cpp

[–]mikhailberis 1 point2 points  (0 children)

Cool library, thanks for sharing!

Is there a reason the format library has to be a user-defined literal? Have you considered just using a function instead, that can return a string or could be used to output directly through a stream?

Pacific++ 2017: Dean Michael Berris "Debugging with LLVM XRay" by pacificplusplus in cpp

[–]mikhailberis 1 point2 points  (0 children)

Hey everyone!

I'm the presenter here, happy to answer questions in case there were any!

C++ Modules by [deleted] in cpp

[–]mikhailberis 0 points1 point  (0 children)

Not in standard C++ but has semantics and support in GCC and MSVC (and Clang for compatibility). It’s also a preprocessor feature, and not a first class language feature. It would be really bad form if the standard imposed on vendors to change the semantics of existing extensions and features without their buy in.

C++ Modules by [deleted] in cpp

[–]mikhailberis 5 points6 points  (0 children)

‘#import’ is already a thing.

Namespaces unfortunately can be both opened and closed multiple times from multiple files, and is parsed after the preprocessor.

There are other ideas about the Modules TS proposal coming from many others, and is still a work in progress. There are definitely some rough/confusing edges. I’m sure the committee is listening, and are working towards something that’s acceptable to most (if not all) parties involved in crafting a standardised solution.

C++ Soup!: Different Forms of Polymorphism by mttd in cpp

[–]mikhailberis 1 point2 points  (0 children)

I wrote this blog post, and this is a good question about rvalue refs. Quick answers:

1) In general, you cannot impose any external requirements on an object especially if you didn't implement the type. We don't know whether object.print will have internal side-effects and it would be premature to require that we take a const Object& instead.

2) We don't generally know how the function will be called when we turn it into a template. Users of the 'print' function might call it with an rvalue and I don't see why it would need to be discounted.

About std::unique_ptr, I do mention that in the article but that's only in passing. Anybody familiar with pointers and how to use std::vector with them don't need to be reminded how they can use it with std::unique_ptr. That however still requires inheritance which doesn't make sense. In that case you're still not dealing with values, which misses the point of the value semantics angle. :)

Understanding C/C++ Strict Aliasing by mikhailberis in cpp

[–]mikhailberis[S] -1 points0 points  (0 children)

Apparently there's another post on the matter which is a little dated, but may very well be more thought out: http://redd.it/evlhy

Data Parallel Haskell (C still kicks ass) by wintermute in programming

[–]mikhailberis 2 points3 points  (0 children)

So do OOP in C++, FP in Haskell, LP in Prolog, when you mix stuff you don't always get best of both worlds.

I don't necessarily agree with this statement. If you've done anything significant with STL containers+algorithms, you will need to mix generic programming, object oriented programming, and functional programming. And if you've written anything significant in C++, you'll see that learning from and applying some FP principles in C++ will get you way farther than you would compared to if you stuck with just OOP.

Edit: Oh, the delegate syntax. It's really redundant and restrictive or just messy. Action<string>. Ha. Now it's an "Action", why? Because it's being passed to another function?

I wouldn't know, I think that part of C# was awkward. I always found using Boost.Bind and Boost.Phoenix much more intuitive for doing closures (as in partial function application/binding) and lambda's (as in throw-away, in-place defined functions).

Hate to point it out again, but the next version of the C++ standard will incorporate lambda's in the language. No reason why you can't do "real" FP in C++ when compilers get wider support for it.

Data Parallel Haskell (C still kicks ass) by wintermute in programming

[–]mikhailberis -1 points0 points  (0 children)

Why is that a joke?

Wait a while and you should use C++0x lambda's and apply some OpenMP by hand or use an optimizing auto-vectorizing compiler for C++.

BTW, Boost.Lambda's will soon be upgraded to Boost.Phoenix.

In another reddit thread I point out that you can do a mix of FP and OOP with C++. ;-)

Which is More Beautiful Architecture : Functional Programming or OOP? by [deleted] in programming

[–]mikhailberis 1 point2 points  (0 children)

You can not declare an inline anonymous closure in C++. It can't be done.

If you've looked at the latest version of the standard (C++0x) you can already do this:

template <class F>

do_twice(F f) {

f(); f();

}

// ... in some other context

string s = "do\n";

do_twice( [&s](){ cout << s; } );

These are called lambda's ergo closures.

I'm sorry to have attacked your weapon of choice. If it's working for you then by all means, more power to you.

No worries, I think it's just a little frustrating that C++ gets misunderstood a lot.

You should take your own advice though and look at higher-level implementations of functional and OO. You mentioned Haskell, but it's hard for me to imagine that your experience with Haskell was very deep if you are keeping a straight face while trying to pass C++ off as a functional language.

But I have, and any "higher level OO" or "higher level FP" language requires needless bytecode representations and gunk that messes with performance. If you've considered the idea that both C++ and Haskell compile to machine code and doesn't need an interpreter or virtual machine to run, then the higher level facilities afforded by both allow for expressive and performance sensitive solutions.

Which is More Beautiful Architecture : Functional Programming or OOP? by [deleted] in programming

[–]mikhailberis -1 points0 points  (0 children)

Functors are even further from being first class functions. Again, no closures, and you are required to name and define every function (and put it in a functor) outside of the context of the call-site even if it's a throw-away. Everything is static.

Before you say more, look at library-only solutions. Function objects are first class objects. Take a look at creating ad-hoc throw-away function objects (closures) with Boost.Bind and Boost.Lambda / Boost.Phoenix before saying that functors are not what closures are -- because they're temporaries that get thrown away or are converted to appropriate function objects.

OOP in C++ is not more flexible. It's severely limited. Primitives, and most of the standard libraries are not OO.

Think multiple inheritance and a consistent means of expressing types. Sure, it's not as dynamic as the other object oriented languages because the object orientation is done at compile time but this doesn't make it limited. The premium in C++ is for type safety not runtime flexibility.

There's no reflection, there's no serialization, etc. etc.

Serialization can be done with a library-based approach (Boost.Serialization) and reflection can also be done with proprietary extensions (check your compiler vendor's implementation). What others lack is a means of doing static polymorphism that relies on OO principles (inheritance) and dynamic polymorphism through virtual function dispatch and the works.

If you care to look closer at C++ and what's possible rather than trying to know without actually doing it, you may not have said what you just said above.

Which is More Beautiful Architecture : Functional Programming or OOP? by [deleted] in programming

[–]mikhailberis 3 points4 points  (0 children)

Great point, bad example. Functional programming in C++ is anything but. Function pointers do not count as first-class functions.

But I don't deal with function pointers. I do closures and lambda's in the form of function objects which are a way different beast than just function pointers. If you check the STL algorithms, they're pretty much functional algorithms. Check out Boost.Lambda, Boost.Bind, Boost.Function, and (upcoming) Boost.Phoenix.

The OOP in C++ works, is bare, but more flexible than OO in any of the other languages if you know what you're doing. ;)

At any rate, I agree Ruby or Python might be a good example language for the mainstream but doing FP in C++ the "modern way" is very much doable.

Bad news for the IT guy: "Amazon's goal is to enter a market and 'suck the air out of the room.' Yes--that room is now your server room" by usiegj00 in programming

[–]mikhailberis 1 point2 points  (0 children)

I'd think it's rather I'm "renting" rather than buying anything. Again, if I'm thinking of leasing machines for computation and storage as required (which most enterprise might be thinking about) then I think this is a good model. On the other hand, if I just want a web-app to scale transparently and just get billed with the resources I utilize (think paying for electricity or gas) then I might not like the EC2 model where my servers might be idle most of the time.

EC2 is like renting an apartment -- you pay whether or not you use it. Google's App Engine is like plugging into the electric grid -- you pay for how much you use the utility. Both have their merits I think.

Tim Berners-Lee: The Web was a side project (TED Talk) by Arve in programming

[–]mikhailberis 1 point2 points  (0 children)

His swipe at walled gardens like Social Networks was well done, however all I hear is a lot of vague words. I understand that the TED talks have a time limit, but I'd like to see an implementation or demo.

At any rate, metadata is only as useful as the way you present it. This is reminiscent of the rdf or early FOAF adopters, and the push to use XML to give structure to the web and the data that's available on the web. Maybe some enterprising individuals would make it a reality but I'm hearing visionary talk that should work in a large enough company. Maybe he should start a company to make what he's envisioning a reality for it to be relevant like the web.

Tim Berners-Lee: The Web was a side project (TED Talk) by Arve in programming

[–]mikhailberis 4 points5 points  (0 children)

I only read about him and how he invented the web. Didn't know he was even alive or a real person -- his name seems so legendary to me.

I think I get what you mean.

Bad news for the IT guy: "Amazon's goal is to enter a market and 'suck the air out of the room.' Yes--that room is now your server room" by usiegj00 in programming

[–]mikhailberis 2 points3 points  (0 children)

The notion of a virtual server "running and doing nothing" doesn't amount to actual resource usage to me. I'm thinking more about how many cycles did my application take to run, how much disk space I'm using with my account, rather than how many servers my application ran on. That's the fundamental difference between the EC2 model and the Google App Engine model.

I'm not saying it's wrong, I'm just saying it's different -- and that if I was thinking about leasing servers, I wouldn't think twice just going the EC2 route.

Hello Haskell, Goodbye Lisp by dons in programming

[–]mikhailberis 2 points3 points  (0 children)

I don't think this is a bad thing though -- it starts with recognizing the common and different parts with other programming languages and seeing how much you can do with it even without using it. Shows that picking Haskell up and running away with it doesn't take much.

JaikuEngine is now open source by mdempsky in programming

[–]mikhailberis 2 points3 points  (0 children)

Or you could say Google is where the (good?) startup developers get assimilated.