From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.devel Subject: Re: New library num-base-converters Date: Tue, 15 Aug 2017 11:50:44 +0900 (JST) Message-ID: References: <87r2wem462.fsf@lifelogs.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: blaine.gmane.org 1502765463 17259 195.159.176.226 (15 Aug 2017 02:51:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 15 Aug 2017 02:51:03 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: Tino Calancha , Emacs developers To: raman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 15 04:51:00 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhRwV-00042j-LD for ged-emacs-devel@m.gmane.org; Tue, 15 Aug 2017 04:50:55 +0200 Original-Received: from localhost ([::1]:54311 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhRwb-0008Ml-RE for ged-emacs-devel@m.gmane.org; Mon, 14 Aug 2017 22:51:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhRwR-0008Kk-U2 for emacs-devel@gnu.org; Mon, 14 Aug 2017 22:50:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhRwO-0000mf-Sq for emacs-devel@gnu.org; Mon, 14 Aug 2017 22:50:52 -0400 Original-Received: from mail-pg0-x235.google.com ([2607:f8b0:400e:c05::235]:34251) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dhRwO-0000mL-Mg for emacs-devel@gnu.org; Mon, 14 Aug 2017 22:50:48 -0400 Original-Received: by mail-pg0-x235.google.com with SMTP id u185so58799937pgb.1 for ; Mon, 14 Aug 2017 19:50:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=K8lKQhNy2rt54qYKifUlRZni55tqmlpXPpJR6Tpwt+k=; b=RftG7S0H0mytNDzeFEKudD9xdtwCu6K5tb1SgugwlXtG0Qo3ecZj4RGQ+M1Qfs52Sz b8488GlzYNBdZz7Pequ37YpwHquaGSBtNeKJmcycc99FNwcMayZ7JNqSe8mD3byRy2yI 0cE7ij4d7lGrAykIBPUlJ55o9c8+gw3lNOGF04S9CtOy0b6RnNmwYXq18XQFK8yPewL5 Tw44hFnpAL/NATwkX/XI7GnTsOFFFhC+gLqUeFJiKsCt0gnAtwcKQDgIafyPTs7YLjAE EQa33tyhaQI61hI+HBi9oeqpp8huHn/EONTNxXAk6mFsS1w0rGCuR+d1n4JU1iCippVG FYUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=K8lKQhNy2rt54qYKifUlRZni55tqmlpXPpJR6Tpwt+k=; b=B74ns5g5iT0c1ENYn6tWcfiMhy54vJqxp8Xg202Hq23SgUrhCQDSBb84WveKbMWM2z YXb4XERYa/NMonuUbmzIy889DhoFwcpAilWRnkMvhbzIseqGTTXcJkXK78Blb5Cm/Ot5 YaJQk3giEI/kUlUE7IS/BH6DgD6JxYMxIrImNf4be7w+AEl4WnyCPgbCJMCZ5AgLaEBp /JZ3Qo5fCboRTtsFdqsc2oCYXjwFI2E/3CYG0VenGAjcVHFmtkhomWSfR21hySP5MU+D 9ZyrupM1XoNp0OBXPEvIGkjm6GCL31OZHOuoYXS+zvWQ7u4JwGQxPR10CuxNeENeqGeB 2EVA== X-Gm-Message-State: AHYfb5jDwK+blVbmWxURO8bHlJCSv3selng39CNw5JIYtZjpHh6iiw0t rR5uIYnc4XD5Cw== X-Received: by 10.84.215.202 with SMTP id g10mr29865184plj.290.1502765447574; Mon, 14 Aug 2017 19:50:47 -0700 (PDT) Original-Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id w189sm13678882pgb.91.2017.08.14.19.50.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Aug 2017 19:50:47 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:217556 Archived-At: On Mon, 14 Aug 2017, raman wrote: > Ted Zlatanov writes: > > this functionality is present in calculator.el -- > I've never called it from lisp though. That module provides additional > conversions --- including radians->degrees etc. Thanks. Sure, you can get this functionality with calc.el as well: indeed num-base-converters.el internally calls `calc-number-radix'. One point of this library is the convenience of not having to know anything about neither calculator.el nor calc.el to get the answer with easy. Every Emacs user will understand the following: M-x nbc-hex2dec ff RET "ff hexadecimal = 255 decimal" M-: (nbc-oct2dec "644") RET => 420 ;; Or just `hex2dec' and `oct2dec' if you customize ;; `nbc-define-aliases' to non-nil.