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

RFC: Use emoji variant selector for unicode characters #5015

Closed
joneugster opened this issue Aug 13, 2024 · 4 comments · Fixed by #5173
Closed

RFC: Use emoji variant selector for unicode characters #5015

joneugster opened this issue Aug 13, 2024 · 4 comments · Fixed by #5173
Labels
P-low We are not planning to work on this issue RFC accepted RFC is waiting for a corresponding PR (external or internal) RFC Request for comments

Comments

@joneugster
Copy link
Contributor

joneugster commented Aug 13, 2024

Proposal

Occasionally, Lean uses emojis, for example it uses ✅❌💥 for debugging. The proposal is to use the variant selector with \uFE0F followed:

In particular, use

emoji variant: ✅️❌️💥️
text variant: ✝︎▼︎▶︎

(which look the same, but are different to the currently used ✅❌💥✝▼▶)

User Experience

Minor improvement, but helps with using custom fonts. See for example live.lean-lang.org:

set_option trace.Meta.synthInstance true

#synth Decidable Nat

which displays

[Meta.synthInstance] ❌︎ CoeT Type Nat Prop ▼
  [] new goal CoeT Type Nat Prop ▶
  [] ❌︎ apply @instCoeT to CoeT Type Nat Prop ▶
  [] ✅︎ apply @instCoeTOfCoeDep to CoeT Type Nat Prop ▶
  [] ✅︎ apply @instCoeTOfCoeHTCT to CoeT Type Nat Prop ▶
  [] ❌︎ apply @instCoeHTCT to CoeHTCT Type Prop ▶
  [] ✅︎ apply @instCoeHTCTOfCoeHTC to CoeHTCT Type Prop ▶
  [] ❌︎ apply @instCoeHTC to CoeHTC Type Prop ▶
  [] ✅︎ apply @instCoeHTCOfCoeOTC to CoeHTC Type Prop 

instead of

[Meta.synthInstance] ❌️ CoeT Type Nat Prop ▼
  [] new goal CoeT Type Nat Prop ▶
  [] ❌️ apply @instCoeT to CoeT Type Nat Prop ▶
  [] ✅️ apply @instCoeTOfCoeDep to CoeT Type Nat Prop ▶
  [] ✅️ apply @instCoeTOfCoeHTCT to CoeT Type Nat Prop ▶
  [] ❌️ apply @instCoeHTCT to CoeHTCT Type Prop ▶
  [] ✅️ apply @instCoeHTCTOfCoeHTC to CoeHTCT Type Prop ▶
  [] ❌️ apply @instCoeHTC to CoeHTC Type Prop ▶
  [] ✅️ apply @instCoeHTCOfCoeOTC to CoeHTC Type Prop 

Further, using the wrong font, one might see inst✝️ instead of inst✝︎, which is distracting.

Beneficiaries

Better support for custom fonts helps in particular the international community as for example Chinese, Japanese or Cyrillic script might require usage of a custom font. E.g. JuliaMono is defacto a solid choice and also used by live.lean-lang.org.

Maintainability

There is some potential issue to consider about unicode characters that look identical.

Community Feedback

There was some private feedback by Joachim Breitner (@nomeata) that ❌︎ and ✅︎ in the trace output is not nice as they are harder to recognise.

Zulip discussion suggests this could be a valid approach if it doesn't create new pitfalls for the user.

Impact

Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add 👍 to it.

@joneugster joneugster added the RFC Request for comments label Aug 13, 2024
@joneugster joneugster changed the title RFC: Use emoji-preferred unicode characters RFC: Use emoji variant selector for unicode characters Aug 13, 2024
@Kha Kha added the RFC accepted RFC is waiting for a corresponding PR (external or internal) label Aug 16, 2024
@Kha
Copy link
Member

Kha commented Aug 16, 2024

RFC accepted

@leanprover-bot leanprover-bot added the P-low We are not planning to work on this issue label Aug 16, 2024
@nomeata
Copy link
Collaborator

nomeata commented Aug 16, 2024

@joneugster, do you plan to implement this as well?

@joneugster
Copy link
Contributor Author

Thanks for looking at the rfc. I can create an implementation next week if that's desired👍

@nomeata
Copy link
Collaborator

nomeata commented Aug 16, 2024

Thanks!

github-merge-queue bot pushed a commit that referenced this issue Aug 26, 2024
First part of #5015, using emoji variant of unicode symbols for
✅️,❌️,💥️.

---

(Partially) closes #5015
mhuisi pushed a commit to leanprover/vscode-lean4 that referenced this issue Aug 27, 2024
Based on leanprover/lean4#5015, use emoji-variant selector for ❌️ across
the Lean universe.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-low We are not planning to work on this issue RFC accepted RFC is waiting for a corresponding PR (external or internal) RFC Request for comments
Projects
None yet
4 participants