From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19687 invoked by alias); 17 Dec 2014 15:56:13 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33991 Received: (qmail 25513 invoked from network); 17 Dec 2014 15:56:01 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 Message-ID: <5491A318.5020303@askmicah.net> Date: Wed, 17 Dec 2014 07:36:56 -0800 From: Micah Waddoups User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: zsh-workers@zsh.org Subject: Suggestion for ZSH, who do I send it to? Content-Type: multipart/mixed; boundary="------------010500020003070305010304" X-Provags-ID: V02:K0:YldjizwsMdYGvPW6n2jSNcLrOjMUhT1rklGJBvOfNVq 4gJrDpew6az/79v0BPIoJ8tR41R14rioR3azMoscTWDWQD2q8H DJhCH4ngeRfT5wi+8p64x61YMXhdMad1ZgSSk4OyJYpQ6yRMg5 RE/rfdfDh7Et9M1xpljBaK5l7EgmqiXZVho8Zg3UtNAbsPGYS/ +ZfhkQFrIuepdQZoGHCsBfVu8UNLVDh7aDnXLTRK87kjmJBBZt OUbnNjd0CVORTPXyOJmBKtoieKilkVfzVDmmF3WhdqLTNiwIlk sRcm53gOyvc2oru2L+HNdQsgJ/YrPHe01RxkKIQwoZVx5mUCzS +VQTi11BxqNfGqe4RliNJtI66oXQM7uQJ3a34yw9t X-UI-Out-Filterresults: notjunk:1; --------------010500020003070305010304 Content-Type: multipart/alternative; boundary="------------010301080007050107090308" --------------010301080007050107090308 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit So, I have a few suggestions. Are you open to using GNU libraries in ZSH? If so, I was thinking how ZSH is so powerful (and easy to use), that it can actually handle all types of data -- like all 256 characters of ASCII. So with multibyte turned off that means binary, even if its a little slow. But here is the problem with dealing with binary, or unusual characters through ZSH, every operation requires using several ZSH builtin commands / variable expansions. This makes a process that converts data into something more usable on the input or the output very CPU heavy and inefficient. My suggestion is to add a few options to the sysread and syswrite builtins that come stock with ZSH in the system module: * -d : (sysread) to make the variable created an integer type containing the numerical value corresponding to the raw byte value, for -s 1; and for -s 2+ (reading more than a single byte), make it an array with each indice containing a string of decimal digit(s), whose numerical value is generated the same way, representing the value for each byte. * -h : (sysread) to make a string value that is two characters per input byte, representing the value of the byte in hexadecimal (padded with 0 if less than 16, and obviously as with above, a null would equal 00). This would make Zsh able to function for whatever given needs (boot environments, less prevalent unix-like systems) without having to supply an xxd program, and it would be much more efficient processing when any math is involved in the script. -- Micah micah@askmicah.net AskMicah.Net , Problem Solving Agency --------------010301080007050107090308 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit   So, I have a few suggestions. Are you open to using GNU libraries in ZSH?  If so, I was thinking how ZSH is so powerful (and easy to use), that it can actually handle all types of data -- like all 256 characters of ASCII.  So with multibyte turned off that means binary, even if its a little slow.  But here is the problem with dealing with binary, or unusual characters through ZSH, every operation requires using several ZSH builtin commands / variable expansions.  This makes a process that converts data into something more usable on the input or the output very CPU heavy and inefficient.  My suggestion is to add a few options to the sysread and syswrite builtins that come stock with ZSH in the system module:
  • -d : (sysread) to make the variable created an integer type containing the numerical value corresponding to the raw byte value, for -s 1; and for -s 2+ (reading more than a single byte), make it an array with each indice containing a string of decimal digit(s), whose numerical value is generated the same way, representing the value for each byte.
  • -h : (sysread) to make a string value that is two characters per input byte, representing the value of the byte in hexadecimal (padded with 0 if less than 16, and obviously as with above, a null would equal 00).  This would make Zsh able to function for whatever given needs (boot environments, less prevalent unix-like systems) without having to supply an xxd program, and it would be much more efficient processing when any math is involved in the script.
--
Micah micah@askmicah.net
AskMicah.Net, Problem Solving Agency
--------------010301080007050107090308-- --------------010500020003070305010304--