Re: [sage-devel] Re: Matrix unicode output

2016-01-26 Thread Jori Mäntysalo

On Tue, 26 Jan 2016, Daniel Krenn wrote:


"Tip of the day"? Special command "hints()"?


Essentially +1 for "hints()". However, help() seems to do a similar
thing and maybe the FAQs above should go there? (FWIW, its now the first
time I've looked at it; I would have looked at hints() probably earlier.)


help() with parameters to show longer help? (And smaller default than 
help() now prints.)


In an ideal world we would also have whatsnew() and maybe the system would 
see what version the user had used. But to make these we should see 
novices using Sage and get their comments. I have got no comments at all, 
not a single one, when I have written to math students here saying that 
now you have a direct connection to development of the software.


--
Jori Mäntysalo


Re: [sage-devel] Re: Matrix unicode output

2016-01-26 Thread Daniel Krenn
On 2016-01-26 06:58, Jori Mäntysalo wrote:
> On Mon, 25 Jan 2016, Samuel Lelievre wrote:
> 
>> When starting the Sage REPL, we currently display the following advice:
>>
>> Type "notebook()" for the browser-based notebook interface.
>> Type "help()" for help.
>>
>> We could add a few more hints that answer frequently asked questions:
>>
>> Type "%display unicode_art" for a nicer display of some outputs.
>> Type "implicit_multiplication(True)" for allowing implicit
>> multiplication.

-1 for crowding the banner with too many hints.

> "Tip of the day"? Special command "hints()"?

Essentially +1 for "hints()". However, help() seems to do a similar
thing and maybe the FAQs above should go there? (FWIW, its now the first
time I've looked at it; I would have looked at hints() probably earlier.)

Best

Daniel

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Matrix unicode output

2016-01-25 Thread Jori Mäntysalo

On Mon, 25 Jan 2016, Samuel Lelievre wrote:


When starting the Sage REPL, we currently display the following advice:

    Type "notebook()" for the browser-based notebook interface.
    Type "help()" for help.

We could add a few more hints that answer frequently asked questions:

    Type "%display unicode_art" for a nicer display of some outputs.
    Type "implicit_multiplication(True)" for allowing implicit
multiplication.


"Tip of the day"? Special command "hints()"?

--
Jori Mäntysalo


Re: [sage-devel] Re: Matrix unicode output

2016-01-25 Thread David Roe
On Mon, Jan 25, 2016 at 8:42 PM, Samuel Lelievre 
wrote:

> When starting the Sage REPL, we currently display the following advice:
>
> Type "notebook()" for the browser-based notebook interface.
> Type "help()" for help.
>
> We could add a few more hints that answer frequently asked questions:
>
> Type "%display unicode_art" for a nicer display of some outputs.
> Type "implicit_multiplication(True)" for allowing implicit
> multiplication.
>

+1
David

>
> Samuel
>
>
> Le lundi 25 janvier 2016 14:17:29 UTC, Volker Braun a écrit :
>>
>> On Sunday, January 24, 2016 at 6:33:00 PM UTC-5, Nils Bruin wrote:
>>>
>>> For attracting novice users who care about presentation of results, I
>>> would guess the terminal-based output is basically irrelevant.
>>>
>>
>> And by making the terminal UI as unwelcoming as possible we can ensure
>> that it stays our best-kept secret.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Matrix unicode output

2016-01-24 Thread Nathann Cohen
> Like for matrices, to come back to the topic?

Indeed, repr(a_matrix) doesn't follow Python's syntax. And list of
matrices is even worse:

sage: [matrix.ones(4) for i in range(4)]
[
[1 1 1 1]  [1 1 1 1]  [1 1 1 1]  [1 1 1 1]
[1 1 1 1]  [1 1 1 1]  [1 1 1 1]  [1 1 1 1]
[1 1 1 1]  [1 1 1 1]  [1 1 1 1]  [1 1 1 1]
[1 1 1 1], [1 1 1 1], [1 1 1 1], [1 1 1 1]
]

> Also, is the Sage output primarily for humans or primarily machine-parsable?

Do you think we should switch to utf8 globally? That would require a
crazy patch (to update all doctests). We can't really have the
'doctest mode' output ASCII while ipython outputs utf8, as otherwise
writing new doctests may become *very* complicated.

Hm... To me switching to utf8 sounds tempting, though I expect
that there will be many headaches ahead that I don't see yet.

Also, while it is true that nobody may have complained about the utf8
banner, perhaps they just don't care enough to tell us.

Err.

Something important: a couple of months ago I was in touch with a Sage
user who happens to be a blind mathematician. He stopped using the
other softwares because his "text reading software" couldn't be used
on that output. He was litterally thanking the Lord on the phone when
I got him to compute the derivative of a polynomial in Sage, and that
he could actually *hear* the output, read by his software.

If we switched to utf8, we would close Sage to him.

:-/

Nathann

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Matrix unicode output

2016-01-24 Thread Volker Braun
On Sunday, January 24, 2016 at 2:09:20 PM UTC-5, vdelecroix wrote:
>
> Yes, you break the fact that for many objects you can copy/paste the 
> output to get your object back 
>

Like for matrices, to come back to the topic?

Also, is the Sage output primarily for humans or primarily machine-parsable?


-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Matrix unicode output

2016-01-24 Thread Vincent Delecroix
Yes, you break the fact that for many objects you can copy/paste the 
output to get your object back


sage: %display plain
sage: integral(gamma(x), x)
integrate(gamma(x), x)
sage: eval("integrate(gamma(x), x)")
integrate(gamma(x), x)

but

sage: %display unicode_art
sage: integrate(gamma(x), x)
⌠
⎮ Γ(x) dx
⌡
sage: u = integrate(gamma(x), x)._unicode_art_()._repr_()
sage: eval(u)
  File "", line 1
⌠
^
SyntaxError: invalid syntax


And what about doctesting?

Vincent

On 24/01/16 16:01, Nathann Cohen wrote:

Okay. So let's say that we enable ascii_art by default: is there a
unintended consequence? Or should we just do that?

Nathann

On 24 January 2016 at 19:57, Volker Braun  wrote:

There is no bulletproof way for the program to determine whether the
terminal can display unicode. But every half-way recent terminal can, and we
have been using unicode in the startup banner for years without problems.
I'd just assume that it works by default nowadays.

%display unicode_art also renders symbolics as art

sage: %display unicode_art
sage: integral(gamma(x), x)
⌠
⎮ Γ(x) dx
⌡

which should be the default in any system that tries to attain new users.
Whereas this is how you dissuade potential new users:

sage: integral(gamma(x), x)
integrate(gamma(x), x)




On Sunday, January 24, 2016 at 12:54:13 PM UTC-5, Nathann Cohen wrote:



sage: %display unicode_art
sage: matrix.block(3,3,[matrix.ones(2)]*9)


Would it be safe to enable unicode_art on startup if it is supported?
Or does it mean that many objects will be displayed with drawings
instead of their usual representation as a consequence?

I am trying to figure out *how* to display matrices in unicode by
default when it is supported.

Nathann


--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.




--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Matrix unicode output

2016-01-24 Thread Nathann Cohen
Okay. So let's say that we enable ascii_art by default: is there a
unintended consequence? Or should we just do that?

Nathann

On 24 January 2016 at 19:57, Volker Braun  wrote:
> There is no bulletproof way for the program to determine whether the
> terminal can display unicode. But every half-way recent terminal can, and we
> have been using unicode in the startup banner for years without problems.
> I'd just assume that it works by default nowadays.
>
> %display unicode_art also renders symbolics as art
>
> sage: %display unicode_art
> sage: integral(gamma(x), x)
> ⌠
> ⎮ Γ(x) dx
> ⌡
>
> which should be the default in any system that tries to attain new users.
> Whereas this is how you dissuade potential new users:
>
> sage: integral(gamma(x), x)
> integrate(gamma(x), x)
>
>
>
>
> On Sunday, January 24, 2016 at 12:54:13 PM UTC-5, Nathann Cohen wrote:
>>
>> > sage: %display unicode_art
>> > sage: matrix.block(3,3,[matrix.ones(2)]*9)
>>
>> Would it be safe to enable unicode_art on startup if it is supported?
>> Or does it mean that many objects will be displayed with drawings
>> instead of their usual representation as a consequence?
>>
>> I am trying to figure out *how* to display matrices in unicode by
>> default when it is supported.
>>
>> Nathann
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Matrix unicode output

2016-01-24 Thread Volker Braun
There is no bulletproof way for the program to determine whether the 
terminal can display unicode. But every half-way recent terminal can, and 
we have been using unicode in the startup banner for years without 
problems. I'd just assume that it works by default nowadays.

%display unicode_art also renders symbolics as art

sage: %display unicode_art
sage: integral(gamma(x), x)
⌠
⎮ Γ(x) dx
⌡

which should be the default in any system that tries to attain new users. 
Whereas this is how you dissuade potential new users:

sage: integral(gamma(x), x)
integrate(gamma(x), x)




On Sunday, January 24, 2016 at 12:54:13 PM UTC-5, Nathann Cohen wrote:
>
> > sage: %display unicode_art 
> > sage: matrix.block(3,3,[matrix.ones(2)]*9) 
>
> Would it be safe to enable unicode_art on startup if it is supported? 
> Or does it mean that many objects will be displayed with drawings 
> instead of their usual representation as a consequence? 
>
> I am trying to figure out *how* to display matrices in unicode by 
> default when it is supported. 
>
> Nathann 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Matrix unicode output

2016-01-24 Thread Nathann Cohen
> sage: %display unicode_art
> sage: matrix.block(3,3,[matrix.ones(2)]*9)

Would it be safe to enable unicode_art on startup if it is supported?
Or does it mean that many objects will be displayed with drawings
instead of their usual representation as a consequence?

I am trying to figure out *how* to display matrices in unicode by
default when it is supported.

Nathann

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.