Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended terminal handling #2

Merged
merged 2 commits into from
Oct 17, 2020
Merged

Extended terminal handling #2

merged 2 commits into from
Oct 17, 2020

Conversation

rocky
Copy link
Member

@rocky rocky commented Oct 16, 2020

Start extended keyboard completion

@rocky
Copy link
Member Author

rocky commented Oct 16, 2020

@mmatera @GarkGarcia @suhr @rljacobson I don't have much knowledge of Mathematica's keyboard handling. Just what I can find from the online docs.

If you happen to know about this aspect and want to look this over to make suggestions, I'd be grateful. Thanks.

@mmatera
Copy link
Contributor

mmatera commented Oct 17, 2020

The command line interface for wma is quite basic. I think any of your proposals are implemented there.

@rocky rocky merged commit e2cc454 into master Oct 17, 2020
@rocky rocky deleted the extended-terminal-handling branch October 17, 2020 04:22
@rljacobson
Copy link

@rocky Mathematica's official CLI is spartan, to put it nicely. Even the most basic features are likely to be an improvement.

@rocky
Copy link
Member Author

rocky commented Dec 10, 2020

@mmatera and @rljacobson thanks for the information. Somewhat related to this is the change in 8322c4a where directed arrows and double arrows were allowed in input.

What I don't understand is the use of F3D5 and F3D4 as the arrow symbols when in Unicode the values are diffferent. Do you understand what is up here?

Also, by the way the FoxySheep parser I think needs to be updated so that it parses these kinds of arrows. I am guessing this was a more recent addition so that's why there aren't in the otherwise meticulously precise FoxySheep?

(By the way the whole pymathics Graph package is pretty cool even if very very rough. This is where I run into this where you can enter edges by using one of these symbols.)

@rljacobson
Copy link

rljacobson commented Dec 11, 2020

What I don't understand is the use of F3D5 and F3D4 as the arrow symbols when in Unicode the values are different. Do you understand what is up here?

The reasons Mathematica makes some decisions about Unicode character choices are not known to me, but in most cases they are at least reasonable. In this case, 0xF3D4 & 0xF3D5 are in a private use block and thus are allowed to be used in this way by the Unicode standard. Pure speculation here, but I imagine that instead of dealing with the mess that is the Unicode arrows (see "About the Arrows" here), they chose private use code points that they could guarantee will have a consistent semantic meaning. (I am without access to Mathematica at the moment, so I can't investigate further.)

I am guessing this was a more recent addition so that's why there aren't in the otherwise meticulously precise FoxySheep?

Correct. In fact, the graph operators are parsed differently in current versions from when they were introduced not that long ago. They used to be non associative so that a \[DirectedEdge] b \[DirectedEdge] c was a syntax error. Now it's left associative (IIRC) so that the same expression is parsed as DirectedEdge[DirectedEdge[a, b], c].

I complained in the WolframLanguage Slack group that I wanted it to be parsed as Graph[{a \[DirectedEdge] b, b \[DirectedEdge] c}], but the author of igraph, Szabolcs Horvát, whose knowledge of Mathematica is unparalleled outside of Wolfram, tells me that mine is the worst possible alternative for graph theory, so who am I to argue?

@rocky
Copy link
Member Author

rocky commented Dec 12, 2020

@rljacobson would you be up for making the correction to FoxySheep? (or FoxySheep2 - your choice)

You clearly are more qualified to do this than I.

Although I've been working mostly here, I think the FoxySheep code should exist as a reasonable alternative.

If on the other hand, you think it should be abandoned in favor of one of the other alternatives such as https://github.com/WolframResearch/codeparser (in C++) or the scanner/parser code in Mathics, then let me know and for the latter I will increase priority on bundling this separately.

Know that you do great work, have a lot of insightful knowledge on WL and why it is the way it is, and this is appreciated.

@rljacobson
Copy link

rljacobson commented Jan 21, 2021

@rocky

...would you be up for making the correction to FoxySheep? ...Although I've been working mostly here, I think the FoxySheep code should exist as a reasonable alternative.

I do think there should be an independent parser like FoxySheep. From my perspective, the most important thing is that the operators are accurately described in the Language Spec, in particular in the table of operators. I want a single source of truth for operator syntax.

But I certainly welcome any pull requests to the current FoxySheep code base—especially if it is useful to someone.

That's my polite way of saying, "I don't want to do it, but you are welcome to." :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants