zeromq 3.1 C++ API 'device' is not a member of 'zmq' - c++

I am noticing that device is not part of the 3.0 api ... what do I use instead?
zmq::device (ZMQ_QUEUE, clients, workers);
I found that the devices have been moved to here: https://github.com/zeromq/libzfl

It's a little confused, so here's the story.
When I inherited maintenance of 0MQ/2.x, it had a zmq_device() function, and a set of external device apps, small main programs with XML configuration.
I'd previously tried to improve and document these two layers, which people were playing with, patches refused by the maintainers. We then moved the external apps to the zdevices project, with more flexible configuration, etc. In the end these got no adoption and were abandoned. zdevices used libzfl (and XML) for its configuration. Most of libzfl got refactored into the CZMQ API (which people do use, a lot).
Sustrik then decided to remove the zmq_device call from 0MQ/3.0, which I explained the the list with the "less is more" argument. People didn't really like this since it broke a lot of existing applications, for a fairly weak reason.
So after the XS fork, I patched zmq_device back into 0MQ/3.1. The C++ API isn't part of the core library, but anyone using it is welcome to patch a device method back into that.
HTH.

AFAIK, currently there no devices available for 3.x but according to the readme
Less is More
Pre-built devices and zmq_device() removed. Should be made available
as a separate project(s).
Exactly one year ago, pieterh wrote the following on the site about the reasons for removing the devices:
It's mostly about being able to improve the device layers independently from the libzmq core. It's been hard to improve these device layers as part of libzmq core, mainly because the core API is considered sacred in ways that other stuff isn't. I.e. one does not touch a core API except between major versions. So, one does not touch devices if they are part of the core, except between major versions.

Just use C API for now:
zmq_device (ZMQ_QUEUE, clients, workers);

Related

Is it possible to make mods in C++ for the bedrock edition on a Windows 10 PC?

(thread title) bedrock minecraft more recognizable as "Windows 10 Edition" Minecraft, is it possible to create a sub category UI menu similar to that in Java minecraft where it says "mods" but in bedrock? and to add mods you make a mods folder that adds the mods coded in C++ (which the language bedrock/windows 10 MC is coded in)?
although this has been answered by #Kosaro, I just wanna add that you can create plugins to use on a PocketMine server. this is mainly written in YAML and PHP, so its not really what your looking for exactly but it a bit more open than just the addons that Minecraft allows you to create. plugins like this are what make things like slapping a NPC on a server like Mineplex possible, or an economy system on a factions server. although this is all dependent on whether you have a pc to host the server, and if your willing to port forward to play with others
It is possible through Blocklauncher. And these mods are called native Mods. It involves disassembling a file in Minecraft apk and using the function calls to call our own function. It is actually so complex. I only found two places to learn.
Tutorials by artus9033 (I've never used these Tutorials)
Github page by byteandahalf (Note: Page 9 is WIP)
Blocklauncher also uses javascript as a bridge between C++ and Minecraft, but it only has very few functionalities compared to C++. Add-ons are also good but have very fewer functionalities than javascript.
Hopes it helps you
Edit1: Blocklauncher is dead I don't know it before. It will work for older versions.
Edit2: There is another app inspired by Blocklauncher which you may like
https://github.com/TripleCamera. I don't know how to install it, but he made it. Blocklauncher scripts will not work (I guess). Blocklauncher works for version 12 and below of Minecraft
No, Minecraft Bedrock edition (aka Windows 10 edition) does not support C++ mods. The only type of mod that Bedrock edition supports are "add-ons", which are either resource packs (which change textures, models, sounds, animations, etc) or behavior packs (which change how mobs behave).
You are able to modify the UI using resource packs, here is an example from the official wiki: https://minecraft.gamepedia.com/Tutorials/Bedrock_Edition_creator_guidelines#UI
You can find more information and tutorials on the official reference page: https://minecraft.gamepedia.com/Add-on
Yes it is possible but it would be very involved and I’m not sure if this would be what the question really pertains to. The way I’ve seen it done is by a program (modding client) injecting itself into the Minecraft process. The injection resembles a virus’s methodology somewhat and the source code for the hacking/modding program was mostly cpp. Look up horion hacked client github. The client seems to be dead now though.

Is Managed Addin Framework alive

I need to implement solution with add-ins executed in their AppDomain. I came across MAF, which is - by description - what I needed.
However the documentaion and its CodePlex project seems to be a bit outdated, some pages in docs do not exist for "Current version" of .NET.
I also found posts about gotchas and complexity of MAF.
So I'm now not sure if I should use it or rather do all the work by myself (add-in management, loading/unloading AppDomains, etc).
Any thought and/or experience appreciated
MAF is a supported piece of the .Net framework, but it hasn't received much attention in years.
Pros
Supports out of process/app domain loading of Addins
Supports backward compatibility for AddIns
Cons
Complex (Requires 5 DLLs in the pipeline)
Requires investment in tooling (You need to update/maintain your own copy of the Pipeline generation code)
Hasn't received any updates in functionality since it was released
There is not a lot of information on the web on best practices or issues people have run into
While there are more cons in that list, it does work and mostly does what you expect. My suggestion is to try it out and see how it works. At the end of the day, the consumers of your API are using an interface and you can always swap out the MAF layer in the future and your AddIns wouldn't need to change.

Integrating TideSDK with C *.dll

I've already written some backend *.dll files that I intend to use in a project. I need to visualize a simulation of the code, for which I intend to use charts and graphs from Chart.JS, by using it along with TideSDK for a desktop application.
I have no clue on how to call the C libraries via JS though. And I want to avoid creating wrapper classes in Python and going through that circuitous route. Any other options? Or are there any alternatives when trying to create an HTML/CSS/JS desktop application connected to a backend C/C++ library? Will AppJS make things easier?
TideSDK is capable of extension with modules that can be compiled and included in its runtime. It was written to be extended but I would recommend waiting for TideKit. TideSDK is a bit old and setting up a toolchain could be problematic at this point.
We've been investing in a broader vision with TideKit that is getting ready for release. You will be able to extend it with native modules and you won't need to wait too much longer to see what we've been up to. http://youtu.be/aE7gN-d0GhUthat
If you have started anything with TideSDK, you will be able to migrate your code easily to TideKit. The ability to work with with native or JavaScript modularity, and to develop for all screens from a single project code base is where all our efforts have been going.
Note that AppJS was discontinued earlier this year. An alternative is writing C extensions in node through node-webkit. Note that if you are going cross platform on this and you needed OSX as well, you cannot achieve Apple AppStore compliance with node-webkit due to private APIs as a result of its port of webkit.

Can I make a rather native C++ app with Android?

I'm interested in the following features:
Writing an app for Android Market that is written completely in C++ (a port of existing product actually).
Use fast screen-buffer pixel pushing (or rather using OpenGL ES for this).
Grab user input and direct it to C++ code.
Is it legal to write such an app for Market? Is Market policy somehow strict to such things?
As of NDK r5 with Android 2.3 (Gingerbread) this is possible, although I assume only devices to support natives apps must have Gingerbread on them.
From the native-activity sample:
The Android SDK provides a helper class, NativeActivity, that allows you to write a completely
native activity. With a native activity, it is possible to write a completely native application.
NativeActivity handles the communication between the Android framework and your
native code, so you do not have to subclass it or call its methods. All you need to do is declare
your application to be native in your AndroidManifest.xml file and begin creating your native
application.
It is really not my cup of tea but there is something called Android NDK (Native Development Kit) to use if you want to write your program in C. Not sure how the C++ compiler support is though.
As far as I know your app can be almost 100% native code but keep in mind that by walking that way you will probably have a hard time supporting the different CPUs out there in Android hardware. If you need to bootstrap the native code so that it is started from java it is probably not a very big problem for you.
I found a few different tutorials when googling for "Android NDK". This one is a very minimalistic Hello World. Obviously you want something much more than a library that returns a string to java but it is a good first start and you will probably have to do all of the things described. Do a search using NDK and Android as keywords and you get a good selection. I see no reason to list them here as such lists tends to be outdated and broken within a year or so.
I guess the official Android Developer site from Google will stay put and be updated on new releases of the platform, it has a link to the current NDK.
With Gingerbread (Android 2.3) it looks like you can build your entire app in C++.
cf:
http://phandroid.com/2011/01/11/android-developers-blog-awesome-ndk-leads-to-awesome-apps/
"
With the latest version of the NDK, r5, many big improvements have been made to coincide with the release of Gingerbread. The most major is the ability to code a native application for Android 2.3 entirely in C++. This means even programmers and developers with no Java knowledge won’t have to implement a single line of that code..."
Can't vouch for the veracity of this blogger, however, from what I have read, it appears you can do this
There is no 100% native solution but what I think you are looking for is the Android NDK (Native Development Kit)
From their site "Please note that the NDK does not enable you to develop native-only applications. Android's primary runtime remains the Dalvik virtual machine."
I believe it lets you make calls to your own native code from an Android application
I have personally never used it for my games, but I am sure it would help on a lot of things (like being able to manage my own memory and not have "lag" do to the garbage collector)
conversations in this thread can help you.
http://groups.google.com/group/android-ndk/browse_thread/thread/50362904ae0574cf
essence is,
It is possible to make Native only apps and Android Market doesn't restrict you either.
But with limited support for native development, there is high chance of using some of the non standard functionality which might break in future releases.
http://developer.android.com/guide/basics/what-is-android.html
"The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language."
http://arstechnica.com/open-source/news/2009/06/android-goes-beyond-java-gains-native-cc-dev-kit.ars
In general, you don't. There is some limited C++ support through JNI, but it is mostly intended to supplement Java code, not replace it. There's no framework/API support (AFAIK) for C++, so doing this isn't really an option.

C++/Qt vs Adobe AIR [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have to choose a platform for our product. I have to decide between The Qt Framework and Adobe's AIR. I am well versed with Qt as I have worked for the last two years. I looked up at the Adobe's site but all the info about flex, flash, ability to coding in HTML/ActionScript is overwhelming and confusing. I cannot understand the following about the Adobe ecosystem.
I have the following questions on Adobe AIR:
What language do I use for coding my application? (not just defining the looks of UI)
Like in Qt I use C++. Is it Actionscript?
Can we say AIR is only for making UI's for apps.
Where is the doc for the utility classes along with AIR?
e.g. http://qt-project.org/doc/ for Qt
Qt ships with a huge set of premade widgets that one can use. Does Adobe ship with any such widget set and if so where can i see it as in url?
I understand flex SDK is open source. Can I make commerical apps and ship them ? Does flex SDK ship everything (compiler, utility classes/widgets)
How much does AIR cost in terms of licensing?
Is there something in AIR that is equivalent to QGraphicsView of QT?
If you needs to access a lot of native libraries, you'll need to stay within your QT environment. Keep in mind that AIR is single-threaded and is run on the Flash Player (something that was originally designed for frame-based animations.)
However, depending on the style of application you're building, AIR might suit you just fine.
Beware that AIR can get confusing because there's a few different developer paths to creating AIR applications: 1) using html/javascript and the AIR SDK, 2) using Flash/Actionscript and 3) using Flex SDK and/or Flex builder. The last one is the most capable as far as coming from traditional desktop development background.
Small apps that are Web 2.0 for hooking into web services are good candidates for AIR applications. Things like the IM client Digsby would be great. My favorite AIR app that I've seen thus far is Basamiq Mockups. Other useful apps are TweetDeck. These are good examples of the types of things that are well-suited to solve with AIR.
You should visit the Adobe Showcase and look at some applications: http://www.adobe.com/products/air/showcase/
Also, if you're looking to just get out of the C++ game, I believe QT has some java bindings now...also I remember some python bindings, but never look at those myself.
As far as QGraphicsView, people have done similar things in Flex. I tried Googling right now but couldn't find them initially, but people have taken things like A large image, and then only displayed a current region in the window. Also, in the next version of Flex, they're acutaly building an official ViewPort component:
http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Viewport
Go spend some time with this AIR application and then ask yourself if Adobe Flex and AIR are worth investing your time in mastering (be prepared to ask yourself why something comparable doesn't exist for the likes of C++/QT):
Tour de Flex
Tour de Flex is a desktop application
for exploring Flex capabilities and
resources, including the core Flex
components, Adobe AIR and data
integration, as well as a variety of
third-party components, effects,
skins, and more.
Some of your questions:
Flex can be coded in MXML and
ActionScript3. AIR additionally
supports HTML/DOM/JavaScript
programming as webkit HTML render engine is built into
the AIR runtime.
MXML is an XML declarative DSL that
gets compiled into ActionScript3
imperative code. It is quite good,
though, for declaratively coding the
graphical forms of the UI (i.e., the
views of the MVC pattern).
ActionScript3 has a heratige that is
founded on JavaScript, but it has
been embelished to the point it more
resembles Java or C#. It has package
namespace, classes and interfaces
with inheritance, class member
access protection keywords,
constructors, static members, and
some very nice additions over Java:
properties, events, data-binding,
and closures.
Flex style programming is also a single-threaded model that relies on asynchronous I/O interactions. This is a simpler model to program than multi-threaded Java Swing or C# .NET Winform apps, yet permits achieving the same net results of program behavior. I elaborate on that here:
Flex Async I/O vs Java and C# Explicit Threading
Flex is open source, you can download the SDK for free, there are no licensing costs associated with it. (see their FAQ)
They do ship a 'flex builder', which is some custom Eclipse I think, and which costs money, but you can perfectly work without it.
The docs can be found at adobe's livedoc pages. (which to some, is enough reason in itself to dislike Adobe ;))
I do wonder, if you are well versed in QT, why are you considering something else? Which advantages do you expect AIR to give you over QT?
I have some experience with both QT and Flex, but not nearly enough to weight one versus the other. I do know QT/C++ is much, much more mature than Flex/ActionScript.
If you already know QT, I don't think the time spend learning a new framework (and programming language) will gain you enough to be honest...
I've used QT and Flex (not so much Air itself though) and have found that Flex is faster for getting apps up and running as well as modifying, while QT gives you more control -- particularly in the installer. The Air app installer is pretty awkward, or at least it was when I tried it, though it may have been improved since then.
The big advantage of Air is that much of the code for it can be run in Flash inside web pages. You can't access the local file system etc. from the web for security reasons but just about everything else is portable.
I made the opposite move. I started working on Adobe stuff and moved to QT. The main reason for doing it was about Adobe framework limitations. When you are using Adobe stuff, you are limited to the tools that they produce, it is hard to introduce external frameworks or libraries, if can not do what you want with Adobe stuff. Usually, the solution to do this is to use sockets, which transforms a supposed "stand-alone" application on a client-server architecture. In addition, if you are using many external stuff it can be hard to manage so many different clients.
Using QT you can code in C++ and add any external framework or lib you want. Even though, some times it can not be easy to code it, is doable and with no "strange" system architecture.
If your looking for some examples of "fun" UIs using Qt and SVG, take a look at the KDEGames [1][2] and KDEEdu [3][4] projects. There's lot's of nice code there that uses QGraphicsView and SVG to created scalable interfaces. Of course note that's it's GPL so be careful what you "borrow" if your app isn't.
[1] http://games.kde.org/
[2] http://websvn.kde.org/trunk/KDE/kdegames/
[3] http://edu.kde.org/
[4] http://websvn.kde.org/trunk/KDE/kdeedu/
I'll second #Pieter's comment - if you already know QT, moving to a whole new environment is going to take a LOT longer.
QT has the advantage of being cross-platform, and very mature: there are libraries for Windows, Linux, and Mac OS X. I'm not extremely familiar with AIR beyond knowing it's from Adobe, but the product site seems to indicate that it's for rich internet apps (http://www.adobe.com/products/air/). If that's true, then QT would be the far better choice if you're developing a desktop application.