[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-26 Thread rjf
On Feb 26, 5:37 am, David Kirkby wrote: > > I was hoping someone might have done it, [Write a grammar for Mathematica] as the task seems > non-trivial. Did you write one for MockMMA, and if so are you willing > to share it? 1. I (with a student) looked at the task and wrote a partial grammar

Re: [sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-26 Thread David Kirkby
On 26 February 2011 04:32, rjf wrote: > > > On Feb 25, 4:28 pm, David Kirkby wrote: > >> Of course, creating the BNF is a non-trivial task, but it seems the >> descriptions of most languages don't actually include a BNF. > > I think you can find a formal grammar for almost every computer > progra

[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-25 Thread rjf
On Feb 25, 4:28 pm, David Kirkby wrote: > Of course, creating the BNF is a non-trivial task, but it seems the > descriptions of most languages don't actually include a BNF. I think you can find a formal grammar for almost every computer programming language except for Mathematica, which presum

Re: [sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-25 Thread David Kirkby
On 25 February 2011 23:30, David Kirkby wrote: > Do you think lex and yacc could be suitably employed for the task? > These are quite nice in that they are included in most operating > systems (there are versions for Windows, Linux, Solaris, AIX, HP-UX > ... etc etc). If I recall correctly, Richa

Re: [sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-25 Thread David Kirkby
On 26 February 2011 00:05, rjf wrote: > Should you (Ira) bother to respond? > I don't care. > RJF It would be good if Ira did respond, but given your attitude (use of the word liar for example), who could blame if he did not? I certainly would not blame him. Dave -- To post to this group, sen

[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-25 Thread rjf
On Feb 25, 1:36 pm, Ira Baxter wrote: > > It is clear that Fateman with no evidence insulted our ability to > parse Mathematica, > as well as our character.  It should be clear that we can parse it > just fine. > You can decide about our character. > > Mr. Fateman does not apparantly understand

Re: [sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-25 Thread David Kirkby
On 25 February 2011 21:36, Ira Baxter wrote: >> > > Here are my suggestions: >> >> > > 1. The guy is lying. He doesn't really have a Mathematica parser that >> > > works. > > It is clear that Fateman with no evidence insulted our ability to > parse Mathematica, > as well as our character.  It sho

[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-25 Thread Ira Baxter
On Feb 25, 10:36 am, rjf wrote: > On Feb 24, 9:57 pm, Ira Baxter wrote: > > > On Feb 23, 11:37 am, rjf wrote: > > > > On Feb 23, 9:17 am, "Dr. David Kirkby" > > > wrote: > > > > > On 02/22/11 10:57 PM, Dr. David Kirkby wrote: > > > > > > On 02/22/11 03:49 PM, rjf wrote: > > > [snip]. The real

Re: [sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-25 Thread David Kirkby
On 25 February 2011 17:02, rjf wrote: > > > On Feb 25, 2:48 am, Ira Baxter wrote: >> Part of this discussion started because Dave suggested that >> writing and maintaining a hand-written parser was harder >> than a parser-generator one, and consequently that Wolfram >> probably didn't write a pa

[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-25 Thread rjf
On Feb 25, 4:55 am, David Kirkby wrote: > > > Wolfram is a bright guy, so I concluded (perhaps incorrectly), he > would have done it the easiest way possible. That would be to ask someone else to do it. > I got the impression that > would have been to use pre-written tools for the lexical anal

[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-25 Thread rjf
On Feb 25, 2:48 am, Ira Baxter wrote: > On Feb 25, 3:05 am, David Kirkby wrote: > > > On 25 February 2011 05:57, Ira Baxter wrote: > > > > Mathematica is otherwise not hard to parse, and you don't need > > > a hand-written parser to do it. > > > > Ira D. Baxter, CTO > > > Semantic Designs, Inc

[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-25 Thread rjf
On Feb 25, 1:05 am, David Kirkby wrote: > On 25 February 2011 05:57, Ira Baxter wrote: > > > Mathematica is otherwise not hard to parse, and you don't need > > a hand-written parser to do it. No, you don't. It is sufficient to mess with the grammar and augments to do essentially any program a

[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-25 Thread rjf
On Feb 24, 9:57 pm, Ira Baxter wrote: > On Feb 23, 11:37 am, rjf wrote: > > > On Feb 23, 9:17 am, "Dr. David Kirkby" > > wrote: > > > > On 02/22/11 10:57 PM, Dr. David Kirkby wrote: > > > > > On 02/22/11 03:49 PM, rjf wrote: > > [snip]. The real difficulty is > > > >> to implement a Mathematic

[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-25 Thread Ira Baxter
On Feb 25, 6:55 am, David Kirkby wrote: > On 25 February 2011 10:48, Ira Baxter wrote: > > > On Feb 25, 3:05 am, David Kirkby wrote: > >> On 25 February 2011 05:57, Ira Baxter wrote: > > >> > Mathematica is otherwise not hard to parse, and you don't need > >> > a hand-written parser to do it. >

Re: [sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-25 Thread David Kirkby
On 25 February 2011 10:48, Ira Baxter wrote: > On Feb 25, 3:05 am, David Kirkby wrote: >> On 25 February 2011 05:57, Ira Baxter wrote: >> >> > Mathematica is otherwise not hard to parse, and you don't need >> > a hand-written parser to do it. >> >> > Ira D. Baxter, CTO >> > Semantic Designs, Inc

[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-25 Thread Ira Baxter
On Feb 25, 3:05 am, David Kirkby wrote: > On 25 February 2011 05:57, Ira Baxter wrote: > > > Mathematica is otherwise not hard to parse, and you don't need > > a hand-written parser to do it. > > > Ira D. Baxter, CTO > > Semantic Designs, Inc. Part of this discussion started because Dave suggest

Re: [sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-25 Thread David Kirkby
On 25 February 2011 05:57, Ira Baxter wrote: > Mathematica is otherwise not hard to parse, and you don't need > a hand-written parser to do it. > > Ira D. Baxter, CTO > Semantic Designs, Inc. Thank you Ira for clarifying this. (For the record, I contacted Ira off-list and asked him to respond t

[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-25 Thread Ira Baxter
It was late and I transcribed the wrong shell output. Here is the parse of Fatemans' example. C:\DMS\Domains\Mathematica\Tools\Parser\Source>type "C:\DMS\Domains \Mathematica\Examples\Fateman.m" r[s[]] C:\DMS\Domains\Mathematica\Tools\Parser\Source>run ../domainparser + +AST "C:\DMS\Domains\Math

[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-24 Thread Ira Baxter
On Feb 23, 11:37 am, rjf wrote: > On Feb 23, 9:17 am, "Dr. David Kirkby" > wrote: > > > On 02/22/11 10:57 PM, Dr. David Kirkby wrote: > > > > On 02/22/11 03:49 PM, rjf wrote: > [snip]. The real difficulty is > > >> to implement a Mathematica language parser, since the language > > >> fails to fit

Re: [sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-23 Thread Robert Bradshaw
On Wed, Feb 23, 2011 at 5:29 PM, rjf wrote: > > > On Feb 23, 1:45 pm, Ivan Andrus wrote: > > >> >> > (RJF) I know of no other programming language that requires this. >> >> C++0x will require something similar for templates, so that >> >> std::vector> x; >> >> will parse instead of requiring >> >

[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-23 Thread rjf
On Feb 23, 1:45 pm, Ivan Andrus wrote: > > > (RJF) I know of no other programming language that requires this. > > C++0x will require something similar for templates, so that > > std::vector> x; > > will parse instead of requiring > > std::vector > x; > > That said, I don't think many people c

Re: [sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-23 Thread Ivan Andrus
On Feb 23, 2011, at 6:37 PM, rjf wrote: > On Feb 23, 9:17 am, "Dr. David Kirkby" > wrote: >> On 02/22/11 10:57 PM, Dr. David Kirkby wrote: >>> On 02/22/11 03:49 PM, rjf wrote: A parser for the maxima language is not only easier to write, it is available in source form. It is also based o

[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-23 Thread rjf
On Feb 23, 9:17 am, "Dr. David Kirkby" wrote: > On 02/22/11 10:57 PM, Dr. David Kirkby wrote: > > > > > On 02/22/11 03:49 PM, rjf wrote: > >> A parser for the maxima language is not only easier to write, > >> it is available in source form. It is also based on a well known > >> technique which i

Re: [sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-23 Thread Dr. David Kirkby
On 02/22/11 10:57 PM, Dr. David Kirkby wrote: On 02/22/11 03:49 PM, rjf wrote: A parser for the maxima language is not only easier to write, it is available in source form. It is also based on a well known technique which is also used by Reduce. The real difficulty is to implement a Mathematica

Re: [sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-22 Thread Dr. David Kirkby
On 02/22/11 03:49 PM, rjf wrote: A parser for the maxima language is not only easier to write, it is available in source form. It is also based on a well known technique which is also used by Reduce. The real difficulty is to implement a Mathematica language parser, since the language fails to fi

[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-22 Thread kcrisman
> While I assume that some people at WRI may be observing the Sage Yes, I can definitely confirm this. > activity, I doubt that they feel Sage breathing down their necks. I agree - so far. But it was amazing how many visitors we had at the JMM booth talking about doing an institutional switch. I

[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-22 Thread rjf
A parser for the maxima language is not only easier to write, it is available in source form. It is also based on a well known technique which is also used by Reduce. The real difficulty is to implement a Mathematica language parser, since the language fails to fit the standard expectations for com

Re: [sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-21 Thread Robert Bradshaw
On Mon, Feb 21, 2011 at 8:37 AM, kcrisman wrote: > > > On Feb 21, 2:00 am, Eviatar wrote: >> I've noticed this too. I wonder if they purposely implemented Sage >> syntax or if it's just a very comprehensive parser. > > I think the goal is to understand any natural syntax for many > questions, and

[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-21 Thread kcrisman
On Feb 21, 2:00 am, Eviatar wrote: > I've noticed this too. I wonder if they purposely implemented Sage > syntax or if it's just a very comprehensive parser. I think the goal is to understand any natural syntax for many questions, and certainly this syntax is relatively unambiguous, and pretty

[sage-devel] Re: Wolfram|Alpha appears to understand some Sage inputs

2011-02-20 Thread Eviatar
I've noticed this too. I wonder if they purposely implemented Sage syntax or if it's just a very comprehensive parser. On Feb 20, 7:40 pm, David Kirkby wrote: > I noticed a couple of things on sage-devel recently about integration > with Maxima. It appears Maxima can't do either of these two. (We