Skip to content

Named characters don't really work #1107

@GarkGarcia

Description

@GarkGarcia

After finishing the work at #1077 and Mathics3/mathicsscript#9 I did a little test in mathicsscript:

Mathicscript: 1.1.2, Mathics 2.0.0dev
on CPython 3.6.9 (default, Oct  8 2020, 12:12:24)
using SymPy 1.7.1, mpmath 1.1.0

Copyright (C) 2011-2020 The Mathics Team.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions.
See the documentation for the full license.

Quit by pressing CONTROL-D

In[1]:= \[Theta] = 4
Out[1]= θ == 4

In[2]:= a = b
Out[2]= a == b

In[3]:= "\[DifferentialD] is the differential"
Out[3]=  is the differential

There are a couple of issues in here. First of all, it looks like = is replaced by in mathicsscript. It looks like this is a mathicsscript-specific issue, but I haven't updated Mathics-Django since #1077 was merged and I got the following when I tried updating it now:

python3 setup.py install
/home/pablo/.local/lib/python3.6/site-packages/setuptools/dist.py:452: UserWarning: Normalizing '2.0.0dev' to '2.0.0.dev0'
  warnings.warn(tmpl.format(**locals()))
running install
running bdist_egg
running egg_info
writing Mathics3.egg-info/PKG-INFO
writing dependency_links to Mathics3.egg-info/dependency_links.txt
writing entry points to Mathics3.egg-info/entry_points.txt
writing requirements to Mathics3.egg-info/requires.txt
writing top-level names to Mathics3.egg-info/top_level.txt
error: package directory 'mathics/algorithm' does not exist
Makefile:42: recipe for target 'install' failed

Anyway, this is probably a silly mistake in mathicsscript and it's probably my fault. I'll investigate this.

What's more concerning is the fact that event thought mathicsscript correctly convert the named characters to their corresponding unicode representations, the kernel doesn't seem to know what they are and they aren't properly display. According to Wolfram's listing of named character:

The Wolfram System provides systemwide support for a large number of special characters. Each character has a name and a number of shortcut aliases. They are fully supported by the standard Wolfram System fonts. For further information about named characters, including character interpretations and naming conventions, please see "Named Characters".

As far as I can tell, named characters should be valid identifiers and should be valid characters inside a string.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions