{"id":701,"date":"2024-09-22T14:38:49","date_gmt":"2024-09-22T14:38:49","guid":{"rendered":"https:\/\/machinemachines.org\/?p=701"},"modified":"2024-09-22T14:38:49","modified_gmt":"2024-09-22T14:38:49","slug":"proquints-in-c","status":"publish","type":"post","link":"https:\/\/machinemachines.org\/index.php\/2024\/09\/22\/proquints-in-c\/","title":{"rendered":"proquints in C"},"content":{"rendered":"\n<p>Inspired by <a href=\"https:\/\/github.com\/dsw\/proquint\">https:\/\/github.com\/dsw\/proquint<\/a> and <a href=\"https:\/\/wiki.xxiivv.com\/site\/proquints.html\">https:\/\/wiki.xxiivv.com\/site\/proquints.html<\/a>, a little snippet to generate a proquint from a 16-bit unsigned short.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const char* consonants = \"bdfghjklmnprstvz\";\nconst char* vowels = \"aiou\";\n\nvoid proquint(uint16_t v, char* result) {\n   \/* c1 *\/ *(result++) = consonants&#91;(v &amp; (15 &lt;&lt; 12))>>12];\n   \/* v1 *\/ *(result++) = vowels&#91;(v &amp; (3 &lt;&lt; 10))>>10];\n   \/* c2 *\/ *(result++) = consonants&#91;(v &amp; (15 &lt;&lt; 6))>>6];\n   \/* v2 *\/ *(result++) = vowels&#91;(v &amp; (3 &lt;&lt; 4))>>4];\n   \/* c3 *\/ *(result) = consonants&#91;(v &amp; 15)];\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Inspired by https:\/\/github.com\/dsw\/proquint and https:\/\/wiki.xxiivv.com\/site\/proquints.html, a little snippet to generate a proquint from a 16-bit unsigned short.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ub_ctt_via":"","neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","iawp_total_views":13,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-701","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"featured_image_src":null,"author_info":{"display_name":"as","author_link":"https:\/\/machinemachines.org\/index.php\/author\/stan\/"},"_links":{"self":[{"href":"https:\/\/machinemachines.org\/index.php\/wp-json\/wp\/v2\/posts\/701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/machinemachines.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/machinemachines.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/machinemachines.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/machinemachines.org\/index.php\/wp-json\/wp\/v2\/comments?post=701"}],"version-history":[{"count":1,"href":"https:\/\/machinemachines.org\/index.php\/wp-json\/wp\/v2\/posts\/701\/revisions"}],"predecessor-version":[{"id":702,"href":"https:\/\/machinemachines.org\/index.php\/wp-json\/wp\/v2\/posts\/701\/revisions\/702"}],"wp:attachment":[{"href":"https:\/\/machinemachines.org\/index.php\/wp-json\/wp\/v2\/media?parent=701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/machinemachines.org\/index.php\/wp-json\/wp\/v2\/categories?post=701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/machinemachines.org\/index.php\/wp-json\/wp\/v2\/tags?post=701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}