Is there an implementation of ZMQ in Octave - octave

After googling a bit, I did not find anything that stroke as really useful.
I was wondering if there was any ZMQ interface implemented for Octave, I know there is something in Matlab, but I have not tried it yet.

I just put together a port of the matlab version which works great in octave (under ubuntu). So far it's working great for what I need:
https://github.com/esromneb/zeromq-octave
The library has a few limitations (for instance publish always connects out and subscribe always binds to a port) but if you can live with that it's great!

There is a zeromq package available from octave forge which works in octave under linux and windows.
You should be able to install it in octave by running:
pkg install -forge zeromq
(assuming you also have the zeromq library installed)
It supports most of the socket types, including pub/sub, req/rep, push/pull.
Details of the package can be found here: http://octave.sourceforge.net/zeromq/

Related

Why does configuration.nix compile while nix-shell uses a prebuilt binary?

I'm using NixOS as the distro on WSL (via the excellent setup provided by Trundle: https://github.com/Trundle/NixOS-WSL) and I'd like to install the racket package. If I run nix-shell -p racket, it dutifully downloads (or uses the previously downloaded) the pre-built binary and I can use it just fine. But if I add racket to the environment.systemPackages list in configuration.nix and try to nixos-rebuild test, it starts trying to build things from source. It fails when it gets to gtk (presumably because WSL2 doesn't yet support graphical applications).
Why the difference in behavior? Is there a way I can convince NixOS to use the pre-built racket when filling out the systemPackages? Happy to post my configuration.nix if it would help the diagnosis, though it's really not much of a departure from Trundle's.

AllenNLP Server: pip is looking at multiple versions of each package

Within my Conda environment with Python 3.6.9, I've installed AllenNLP 9.2.0. I tried to install AllenNLP Server following the instruction from https://github.com/allenai/allennlp-server by running pip install --editable .
However, the installation procedure never finished as the compatibility checks with several modules, e.g. pip is looking at multiple versions of tqdm to determine which version is compatible with other requirements. This could take a while. Collecting tqdm>=4.19
Does anybody know what happens here? Should I add more restrictions to steup.py in AllenNLP server? However, there is any code included in such file.
Thanks a lot for your help.
I just tried it with AllenNLP 2.0.1 (the latest), and while it takes a long time, it does eventually resolve the packages.
That said, I would recommend two things:
Use Python 3.8 instead.
If it still doesn't work, specify a version of tqdm tightly in the requirements. My version automatically picked tqdm==4.56.2, just or reference.

Octave gets stuck on Busy... inside TeXmacs in Windows OS

I have TeXmacs and Octave installed, both working properly otherwise. I have also added the path to octave executable (i.e. C:\Octave\Octave-5.1.0.0\mingw64\bin) to the Windows environment variables and octave runs in cmd/PowerShell terminals and Jupyter with no hassle. However, when running Octave inside TeXmacs through Toolbar > insert > session > octave it gets stuck on Busy..., the same reaction for any other commands as well:
Octave gets stuk on Busy... inside TeXmacs.
This is my environment:
TeXmacs 1.99.9
Octave 5.1.0 (installed through Chocolatey)
Windows 10 version 1809
I would appreciate if you could help me know what is the problem and how I can solve it.
P.S. I have reported this issue in the TeXmacs repo.
#Foad. I wrote an updated Octave plugin for Texmacs. I tried it on Windows, OSX and Linux, works on the systems I have access to. If you are interested to test it, you can download the zipped archive from here https://lists.gnu.org/archive/html/texmacs-dev/2019-12/msg00005.html.
To install it, unzip the archive and copy the octaveX directory in the application plugins folder, alongside all the plugins that come with the standard Texmacs installation. Won’t work if installed in ~/.Texmacs/plugins. If everything goes fine, you should find a new Insert/Session/OctaveX menu (note: I changed the session name). If not, try to refresh the plugin system with the menu Tools/Update/Plugins. If you try it, please let me know, especially if you find troubles. In case I will do my best to fix them.
A fundamental prerequisite is a working octave-cli command in a operating system shell. Should be standard on Linux, may require some additional setup on Windows (environmental variables) or OSX (.bash_profile). You can find some help and more details under the menu Help/Plug-ins/OctaveX.
Concerning the error you found, as far I understand there are some issues with the standard distributed plugin: first, a .octaverc file is missing, so several variables are not initialized, in addition the Windows version calls a not existent file. Moreover the plotting functions are quite old and are not compatibile with Octave newer than version 2 (or maybe 3, anyway a quite old version).
You could try to run the command in
%TEXMACS_PATH%/plugins/octave/bin/tm_octave.bat
from the terminal to see what happens. There is a problem with this plugin and it does not work also on Mac but I do not know enough Octave to fix it. Somehow it does not manage to find the files which are in
%TEXMACS_PATH%/plugins/octave/octave
Please try to modify tm-start.m to look like
d=getenv("TEXMACS_PATH");
if (length(d) > 0)
addpath("tm:polynomial:plot")
tmrepl
endif
In windows, octave should be run using the scripts octave.bat (in the mingw64\bin directory of the octave install) or octave.vbs (in the install directory) for the GUI
You should not run octave.exe directly.

How to install FEATool on Octave (Ubuntu 18.04)?

I want to install FEATool on Octave 4.2.2. Therefore, I went through these steps:
Downloading it.
Trying pkg install FEATool-Multiphysic.tar.gz in Octave command-line interface.
Octave returns this error:
COPYING file missing.
Neither GitHub nor FEATool provides any installation file for Octave or instructions about doing it.
Therefore, the question is:
How to install FEATool on Octave (Ubuntu 18.04)?
Following a quick preliminary check, it seems that the FEATool is no longer available or compatible with Octave since FEATool v1.10.
While there was no explicit announcement for this either on their blog or changelogs, according to the main author of the software (as elicited below), this seems to relate to overhead involved in supporting Octave on top of Matlab. Furthermore, as the company seems to have effectively chosen (for their own good reasons, I'm sure) to intentionally follow a direction that explicitly breaks Octave functionality, it cannot be expected to work on this platform even as unsupported software. Therefore the answer to your question is that "no you can no longer install this tool on octave (ubuntu or otherwise)".
Evidence that this software is no longer available for, or compatible with Octave:
Mentions to Octave in the documentation from v1.8 have now disappeared and are exclusive to Matlab (with extra effort towards Matlab backwards compatibily)
The .tar.gz package is no longer an Octave-compatible package.
The main code relies on .p files, which obfuscate the code and are unsupported in Octave
Past releases and source code have disappeared and are no longer available for download, both from sourceforge, official website, and github. Therefore it is not possible to download the octave-compatible v1.8 of the tool either.

Symbolic integration in Octave? (Need to Install extantion? How? - Using Ubuntu 12.04)

I would like to calculate the following symbolic expression in GNU Octave:
int(exp(ikx-|k|^n),k,-infinity,infinity) , (- it would a function of 'x' of-course, where 'x' is an array of data.)
I don't succeed.
I understood, searching a bit in the internet, that Octave does not come initially with a built-in 'Symbolic math' suite.
Is this true?
How do I download and install it (using Ubuntu 12.04, from the 'Terminal'?)?
Thanking u on advance!
Yes. GNU octave is the core program and language. What you are looking for are functions from the symbolic package that belong to Octave-Forge. They are two different but related projects. Let me remind you that the symbolic maths toolbox is also not part of Matlab core, it's a different product.
To install them in Ubuntu, it depends on how you installed Octave:
from the Ubuntu repositories? If so, sudo apt-get install octave-symbolic.
compiled it Octave yourself? Start Octave and at the Octave prompt pkg install -forge symbolic
from one of the up to date PPAs? Check if they also have the sybolic package and install that one
I can tell you in advance that the symbolic package has been unmaintained for a long time, and doesn't work very well with latest Octave versions (it was written for a very old version of Octave). The advice usually is to switch to Maxima which is designed exactly for that. Since 2015 the symbolic package is again actively maintained. However, Octave is still a programming language aimed at numerical computing. If all your problems require symbolic computations, then consider using a computer algebra system. Maxima is often recommended.