Plotting with Maxima and Pango error - macos

I've been running Maxima on my iMac with Sierra. I just tried doing some examples to learn about plotting. When I try to make a plot with the plot2d command I get my plot but there are no labels, no numbers on my axis and no title. No text at all. I also get a series of error messages related to a module called Pango.
The error messages are:
(process:11388): Pango-CRITICAL **: No modules found:
No builtin or dynamically loaded modules were found.
PangoFc will not work correctly.
This probably means there was an error in the creation of:
'/opt/mac/quartz-new/etc/pango/pango.modules'
You should create this file by running:
pango-querymodules > '/opt/mac/quartz-new/etc/pango/pango.modules'
(process:11388): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderCoreText', script='common'
(process:11388): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderCoreText', script='latin'
Does anyone know how to resolve this. It only happens with inline plots. If I use the wxmaxima menu for plotting and send it thru GNUPLOT I avoid this issue.

I don't have a Mac so I haven't tried these commands; I found this info via a web search. I hope it works for you.
It appears that the Pango library is not installed. Searching the web seems to show that installing it is simple: http://brewformulas.org/Pango
That method requires a package manager named Homebrew. If that is not already installed, you'll need to install Homebrew first and then Pango. See: http://macappstore.org/pango/

Related

Installing packages in Julia while using Pluto

I would like to use the package HDF5
In my Pluto.jl, I have the line
using HDF5
When I try to evaluate this cell, I get the error message
"ERROR: LoadError: HDF5 is not properly installed. Please run Pkg.build("HDF5") and restart Julia."
I would like to do this, but when I go to the terminal, I can't do this while I have Pluto open.
I've tried running Pluto in the background with a command like
Pluto.run() &
But this code is completely wrong.
I've also heard that there sometimes appears a cloud icon above the cell, which would allow me to download HDF5 directly.
In any case, it seems to me like any time this happens, I will have to write down which package I need to install, and then kill my Pluto notebook, go to Julia, install, and restart Julia. Surely there is a better way? Can anyone help me find it?
When the package is correctly installed or could be installed without problems, using HDF5 in Pluto itself is sufficient. The built-in Pluto package manager takes care about the installation.
There are edge cases where due to issues with external packages installation does not work out-of-the-box. In this case, it could help to install the package in a temp environment before starting Pluto:
] activate --temp
] add HDF5
follwed by whatever steps required to get the package working in Julia itself, like re-building it.
This should really be a workaround and should be fixed in the corresponding package - consider creating an Issue there if it does not exist already.

Golang image iptc metadata

I need to get the meta data, especially the iptc meta data from the uploaded files on the server.
I have found two packages I can import, but both of them require the "libiptcdata" libary. It should not be a problem, but after I installed the libary with brew, as it is written on both of the packages page, and typed go get "https://github.com/Melraidin/iptc" (for example, one of the two packages I wanted to use), I got the following error:
../../github.com/Melraidin/iptc/main.go:10:10: fatal error: libiptcdata/iptc-data.h: No such file or directory
#include <libiptcdata/iptc-data.h>
^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
The error is real, the file is really is not there, but how then it could work at anyone else? I found these 2 packages suggestion of using on a few page.
Thank you for your help
First, I have removed the brew installed "libiptcdata" libary, than installed the following libaries:
"libiptcdata0"
"libiptcdata0-dev"
"python-iptcdata"
with these three, the "go get" is managed to run, and could continue working on the original problem...

D3.js, trouble initiating shp2json - encoding-indexes error

I'm trying to follow the tutorial Mike Bostock did for Command Line Cartography (which is a great help). Right after installing shapefile and running the shp2json step [shp2json cb_2014_06_tract_500k.shp -o ca.json] I get this error message:
“error: Decoder not present. Did you forget to include encoding-indexes.js first?” an error message which originates from the text-encoding package from NPM.
In trying to diagnoise the problem, I figured I should manually install text-encoding as it's in the shp2json dependency list but, didn't appear to be loading. I also reinstalled node to downgrade from 7.3.0 to 6.9.2 and a number of other things (my hacking around looking for a solution for a few hours) but, am stuck. Is this just a matter of updating a package.json?
I’m using Windows7, the env variables is set I believe correctly to \Users\myAccount\AppData\Roaming\npm. I’ve installed all packages globally as well. Thanks for any insight.
I had the same problem when running the "#prepublish" script here. Then I noticed that Mike's shapefile repo has this information in the README:
# shp2json --encoding *encoding*
Specify the dBASE table file character encoding. Defaults to “windows-1252”.
So I experimented and changed that script to:
shp2json --encoding utf-8 cb_${YEAR}_${STATE}_tract_500k.shp
Note that in this line above my state and year variables had been defined higher in the script (I was using Texas[48], not California[06]).
Also, I was getting another error asking for d3-array. So I installed that, too.
Problem solved (at least in terms of processing the data and getting it to render in the browser). Others issues, like projection, remain. Obviously.

Highlight errors in Terminal

I had a problem with Terminal a Jekyll install but I didn't spot the site being not-uploaded to the server by rsync because I didn't see an error in the output. So, I was wandering:
Is there any way to make Terminal detect errors and give them a specific color?
My error here was:
rsync error: unexplained error (code 255) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
It had other things, but if this line was highlighted, I would have spotted it way earlier.
Generally speaking, color output is a responsibility of a program and not a terminal.
For example, clang compiler produces colorful error and warning messages.
If the application you are using does not support this, the only option is to create a wrapper and parse its output, highlighting errors in different color. This approach is taken by colorgcc, for instance, to make GCC compiler output in colors.
Perhaps you can grab that script and adjust it for your needs? Check it out here - https://github.com/colorgcc/colorgcc
Also, if there are errors, the app should probably exit with non-zero exit code. It might be a good idea to check it and write an even bigger and noticeable message upon exit in case of errors.
Hope it helps.
Good luck!
You can enable highlighting of errors for one command with the hilite utility. It only works for commands you type hilite for – it isn’t enabled globally – but it’s still useful if you know or suspect that a command outputs errors and you want to locate them. So when you build with jekyll, you could do any of the following:
Change jekyll … to hilite jekyll … in your build script
Try to remember to always type hilite before jekyll
Run jekyll normally, but if its output or exit code makes you suspect you got errors, run it again with hilite to locate them
On OS X, you can install hilite with Homebrew using brew install hilite.

Mathematica won't find SerialIO package

I'm following a guide from The Mathematica Journal that describes how to use Mathematica with the Lego Mindstorms NXT. I have some trouble getting started and got stuck with the SerialIO package.
I use Mac OSX and I have installed the package to:
/Applications/Mathematica.app/AddOns/ExtraPackages/SerialIO/
The command Needs["SerialIO`"] gives me the following error message:
LinkOpen::linke: Could not find MathLink executable.
And trying
SetDirectory[FileNameJoin[{$InstallationDirectory, "AddOns", "ExtraPackages", "SerialIO", $SystemID}]];
Does not help either, it gives:
SetDirectory::cdir: Cannot set current directory to /Applications/Mathematica.app/AddOns/ExtraPackages/SerialIO/MacOSX-x86-64.
There seem to be some problem with the alias/symbolic link in the SerialIO folder. By default they pointed to an absolute directory on the machine that this library was built on:
MacOSX-x86-64 -> /Files/schofield/Packages/SerialIO/Build/Mac/build/Deployment/Package/SerialIO/MacOSX
I tried deleting the alias and creating a symbolic link in the terminal:
ln -s MacOSX MacOSX-x86-64
Running the SetDirectory command again result in... no result, so I guess thats good. The commands seem to have been loaded as when typing Serial it want to autocomplete to SerialOpen etc.
However, using the command mybrick = SerialOpen["name of serial port"] does not put the NXT in connected mode (<> on NXT display). Does anyone else got it to work?
There was a problem in SerialIO in combination with Mathematica9. After some correspondence in may 2013, Wolfram Support find the problem and updated SerialIO for me. It seems logical that they also update SerialIO on their site. Please have a try and download SerialIO again and update. My OS is MaxOSX.

Resources