Open Simon-Laux opened 9 months ago
They are not meant to be typed as a human. They contain a 32 byte node id that is random and can not be compressed. No matter what dictionary you use, this will be a pain to type.
Not sure what can be done about this tbh. Use DNS or a similar mechanism to assign a name to a node id, with all the downsides this has? Definitely not something we would require by default for this tool.
Splitting it into chunks separated by characters that are outside of the base32 would already help readability greatly, because then it become easier to check for errors:
dumbpipe connect nodeedijgsumxv3p3jtthg2j7y4y7unfsw2teeju2qkyvrwpgh3nrmpgaaicaqambkfsgsh4caya3hxntn4pyebqciadadea6ayyaaclvt4qdpphfn4qyebqciadadea6ayyabccehucpvyt4xuqyebq
# vs
dumbpipe connect nodeedijgsum.xv3p3jtthg2j.7y4y7unfsw2t.eeju2qkyvrwp.gh3nrmpgaaic.aqambkfsgsh4.caya3hxntn4p.yebqciadadea.6ayyaaclvt4q.dpphfn4qyebq.ciadadea6ayy.abccehucpvyt.4xuqyebq
some examples:
chunks of 12 chars:
nodeedijgsum_xv3p3jtthg2j_7y4y7unfsw2t_eeju2qkyvrwp_gh3nrmpgaaic_aqambkfsgsh4_caya3hxntn4p_yebqciadadea_6ayyaaclvt4q_dpphfn4qyebq_ciadadea6ayy_abccehucpvyt_4xuqyebq
chunks of 5 chars:
nodee_dijgs_umxv3_p3jtt_hg2j7_y4y7u_nfsw2_teeju_2qkyv_rwpgh_3nrmp_gaaic_aqamb_kfsgs_h4cay_a3hxn_tn4py_ebqci_adade_a6ayy_aaclv_t4qdp_phfn4_qyebq_ciada_dea6a_yyabc_cehuc_pvyt4_xuqye_bq
chunks of 8 chars:
nodeedij_gsumxv3p_3jtthg2j_7y4y7unf_sw2teeju_2qkyvrwp_gh3nrmpg_aaicaqam_bkfsgsh4_caya3hxn_tn4pyebq_ciadadea_6ayyaacl_vt4qdpph_fn4qyebq_ciadadea_6ayyabcc_ehucpvyt_4xuqyebq
I think _
is the best character for this, because double click still selects the whole string, but -
would be better for subdomains, though I can't think of a use case where tokens are put into a subdomain 🤷 (anyways this would be only cosmetic anyway, just to help humans to type it)
We can make any non base32 char a separator that just gets stripped out during parsing. So _ would work.
Tickets can't be a subdomain because they are too long. A subdomain is limited to 64 chars, and a ticket that contains direct addresses will be more than that.
I think a good option for desktop users would be to automatically put the token or command into the clipboard. I dunno if sending the string to stdout would work, but that would be another option such that the user can then pipe into wl-copy or save to a file.
I tried it and I failed.
Ideas that could help: