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

Prefer non-ASCII syntax in code samples #1520

Open
1 of 5 tasks
AlexDaniel opened this issue Sep 3, 2017 · 10 comments
Open
1 of 5 tasks

Prefer non-ASCII syntax in code samples #1520

AlexDaniel opened this issue Sep 3, 2017 · 10 comments
Labels
big Issue consisting of many subissues meta RFCs, general discussion, writing style, repository organization, etc. wishlist "nice to have" issues; might require a lot of work or a big change or be low priority

Comments

@AlexDaniel
Copy link
Member

AlexDaniel commented Sep 3, 2017

I am inclined to create this ticket because:

  • There was a ticket asking to provide texas versions of code snippets: Provide (automatic) Texas variant sample code in html view, hidden by default #526
  • “The community as a whole is pushing unicode; I think the docs should lead in this effort, and it's OK to be unicode only, because […]”⁽¹⁾
  • Replacing non-texas ops will be relatively easy should we decide to move in another direction (much easier than doing the opposite)
  • Automatically replacing non-texas ops on the fly will be possible if we decide to reopen Provide (automatic) Texas variant sample code in html view, hidden by default #526 (other way around is nearly impossible)
  • Copy-pasting code snippets from docs into perl6 -e '…' is easy for users if non-ascii quotes are used consistently
  • Currently our docs are using "…" type of quotes too much (possibly contributors are preferring "…" instead of '…' so that things can be copy-pasted into perl6 -e '…', but I'd much rather see single quotes used consistently when no interpolation is needed)
  • The transition is relatively easy given that we don't have to force contributors to use non-ascii stuff. We can simply have some xxt/ tests and someone who can type non-ascii stuff easily will rework a bunch of new code snippets once a few months.

It may sound radical but I guess that's technically the right thing to do.

TODOs:

@AlexDaniel AlexDaniel added the meta RFCs, general discussion, writing style, repository organization, etc. label Sep 3, 2017
@AlexDaniel
Copy link
Member Author

FWIW for downvoters: consider upvoting instead. This ticket will give enough incentive to provide automatically generated texas code samples. Right now we have a bunch of code samples with texas syntax and a bunch of code samples with non-texas syntax. Everyone loses. But we can possibly have a win-win situation if we start moving into the direction this ticket suggests.

@AlexDaniel
Copy link
Member Author

AlexDaniel commented Sep 3, 2017

Just to clarify the texas/non-texas confusion, this ticket is saying that we should change in code samples:

  • Inf to
  • >> to »
  • etc.

@AlexDaniel AlexDaniel changed the title Prefer non-texas syntax Prefer non-texas (non-ascii) syntax in code samples Sep 3, 2017
@AlexDaniel AlexDaniel added the big Issue consisting of many subissues label Sep 3, 2017
@JJ
Copy link
Contributor

JJ commented Feb 9, 2018

I'm all for this, but we should either provide a test that checks it or an exhaustive list to start modifying it.

JJ added a commit that referenced this issue Feb 9, 2018
Refs #1520. I chose this one because it's got a log of Inf. Not
changed in text or when it actually returns Inf.
@nxadm
Copy link
Contributor

nxadm commented Mar 26, 2018

I understand that a lot of people love unicode source code. For a lot of people in my surroundings, however, it's seen as "cute".
Needing to configure shortcuts and keyboard profiles just for "hello world"-type of examples is a non starter for a lot of people. It would be for me.

@AlexDaniel
Copy link
Member Author

@nxadm that's OK and I think nobody is objecting. But what is your proposal?

As stated in the OP, we already have some examples with non-ascii characters. Changing them all to ASCII is not going to happen I think, but we can perhaps turn them into links that point to unicode_ascii page, so that anyone can quickly see the ascii equivalent if they need to. Would that be good enough in your opinion? And if not, what would be then?

@nxadm
Copy link
Contributor

nxadm commented Mar 26, 2018

I don't know about web development enough, but it would be could if the ascii example would he hidden under a click-open arrow beneath the unicode example.

@JJ
Copy link
Contributor

JJ commented Mar 26, 2018 via email

@nxadm
Copy link
Contributor

nxadm commented Mar 26, 2018

JJ added a commit that referenced this issue Apr 14, 2018
And also substitutes `Inf` for `∞` in a bunch of places.
Refs #1520, but does not really close it. Lot of work to do, and maybe
some discussion
@JJ JJ changed the title Prefer non-texas (non-ascii) syntax in code samples Prefer non-ASCII syntax in code samples Apr 14, 2018
@JJ JJ removed the JJ TPF Grant label May 14, 2018
@AlexDaniel
Copy link
Member Author

Looking at it now:

Automatically replacing non-texas ops on the fly will be possible if we decide to reopen #526 (other way around is nearly impossible)

This is probably incorrect, as Perl6::Tidy can do the conversion both ways (drforr/perl6-Perl6-Tidy#3). One is more difficult that the other for sure, but both should be possible.

@JJ
Copy link
Contributor

JJ commented Jul 21, 2018 via email

@coke coke added the wishlist "nice to have" issues; might require a lot of work or a big change or be low priority label May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
big Issue consisting of many subissues meta RFCs, general discussion, writing style, repository organization, etc. wishlist "nice to have" issues; might require a lot of work or a big change or be low priority
Projects
None yet
Development

No branches or pull requests

4 participants