hilbert
hilbert copied to clipboard
Mostly broken installation on Fedora 20
I just installed hilbert, and many things don't seem to work.
Works, e.g.:
Enjoy! -> P -> Q
Defined: P -> Q is TRUE
Enjoy! -> Q -> R
Defined: Q -> R is TRUE
Enjoy! -> (P -> R)?
Evaluate: (P -> R) is TRUE
Doesn't work, e.g. (all copy/pasted from README):
Enjoy! -> x^2
x ^ 2
Enjoy! -> d/dx(x^2)
I'm so sorry, something wrong. Please feel free to report this.
Enjoy! -> S(log(x)dx)[0..1]
I'm so sorry, something wrong. Please feel free to report this.
Enjoy! -> lim[x->oo] (1 + 1/x)^x
I'm so sorry, something wrong. Please feel free to report this.
Enjoy! -> ∑[x=0,10] x
0.0 <--------------- wrong result!!
Oh, and you a word between "something" and "wrong" (or was that intentional?) :)
Besides, that error message is completely useless.
I'm on a fully updated Fedora 20 and installed hilbert via "gem install --user hilbert". I've updated all gems via "gem update --user". Im on ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux].
@fxkr If you wanna do real analysis, You need to type 'postulate zfc_analysis' and enter.
Thank for using!
If there is still problem, please feel free to let me know.
I suggest that postulate zfc_analysis
be enabled by default, whatever it does. Requiring the user to type an unguessable command before running certain calculations makes the program harder to use, and there is no reason it should be necessary. If the rest of the program is slow or gives wrong answers when that mode is enabled, then that is what should be fixed, not the user’s behavior.
If that mode can’t be enabled by default for some reason, then at least the error message should be changed to “Run postulate zfc_analysis
to enable this calculation.”
I'm not sure about whether it should be enabled by default. Polluting the default namespace doesn't seem like a good idea. Maybe these imports could be run by default, but for an interactive shell only. Take a look at how https://github.com/sympy/sympy does it:
$ isympy
Welcome to pylab, a matplotlib-based Python environment [backend: TkAgg].
For more information, type 'help(pylab)'.
IPython console for SymPy 0.7.5 (Python 2.7.5-64-bit) (ground types: python)
These commands were executed:
>>> from __future__ import division
>>> from sympy import *
>>> x, y, z, t = symbols('x y z t')
>>> k, m, n = symbols('k m n', integer=True)
>>> f, g, h = symbols('f g h', cls=Function)
Documentation can be found at http://www.sympy.org
In [1]:
Somewhat wordy, perhaps, but useful and not confusing.
If they aren't imported by default, I think it's really important that the commands in the README are copy-pasteable. If "postulate zfc_analysis" is required for the samples, they should include it.
Also, ∑[x=0,10] x
should not give a wrong result. Return an error if an import is missing, but don't silently return a wrong result.
Enjoy! -> ∑[x=0,10] x
0.0
Enjoy! -> postulate zfc_analysis
success! :)
Enjoy! -> ∑[x=0,10] x
55.0
And while we are at it, maybe you could make the "postulate" command silent when it's successful. It makes it much easier to distinguish between "everything is alright" and "something is broken" if successful operations are silent (consistently) (unless they have actual output, of course).