From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.help Subject: Re: [modules] Possible return values of the env->type_of? Date: Fri, 22 Jun 2018 13:52:44 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1529689884 11429 195.159.176.226 (22 Jun 2018 17:51:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 22 Jun 2018 17:51:24 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: =?UTF-8?Q?Aur=C3=A9lien_Aptel?= , Philipp Stephani Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 22 19:51:20 2018 Return-path: Envelope-to: geh-help-gnu-emacs@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 1fWQDP-0002rQ-Gb for geh-help-gnu-emacs@m.gmane.org; Fri, 22 Jun 2018 19:51:19 +0200 Original-Received: from localhost ([::1]:35472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWQFW-0004Gf-T1 for geh-help-gnu-emacs@m.gmane.org; Fri, 22 Jun 2018 13:53:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWQF2-0004GL-61 for help-gnu-emacs@gnu.org; Fri, 22 Jun 2018 13:53:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWQF1-00009C-44 for help-gnu-emacs@gnu.org; Fri, 22 Jun 2018 13:53:00 -0400 Original-Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]:41825) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWQF0-00008y-RL for help-gnu-emacs@gnu.org; Fri, 22 Jun 2018 13:52:59 -0400 Original-Received: by mail-lj1-x229.google.com with SMTP id v12-v6so1577234ljj.8 for ; Fri, 22 Jun 2018 10:52:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BcoV0hKFrHsoEhxsMJkvGJkGSLQPr9ZVsAWrnCP9uxs=; b=px3ah8RLMEyJ4oDroRC/RNAzrEYW2IF4bgfe4AmhUZssIw3XLg9KS1/4kx9/fUATAC hI6xlyuPTnUNShq8XhdW/IXOC6/oOj8N4x0ihNErzvr9YXIZRBt9HBgAzzziYHmj1wmm 4b9Pnq+CEtT3hk3yzGkgCcP6PHu16TJibJKYyoNxcinEEKOXUByC/R+2OvtQ/MJqALes G0CudekZlaGWuhUrqYYy8JriZ/x1dtoSLfr5CVinCUu8q+tJVTmnA82wxympqMfqtfBO jBCfSuZGRDTmcxJxhxs2utfUGdPfKrs5yggSVKiZpj//4yUxhaeYvrvNPxGXwg6YkVSn UYEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BcoV0hKFrHsoEhxsMJkvGJkGSLQPr9ZVsAWrnCP9uxs=; b=BGwmKXo0QH0cT5B4h0S3AgVISpDnoSjferM9BQyuYF/ygrqBWoU/ugJmWSwEEYDk9o oj8RF5i0y6bky5HWWeiSGxU4K2zO1W0ryvrDPK4PDsa5F3KBI+d7+48e3Q2aZYAzmMk+ WsZ595Y0yoi3b0FKdlWCOiKUSy+IBuuMiFY6/s1yYPX9RtD0C/jloQf/wm84D8iPgh/u uuga8F3f00N9Iq8lJTNGVTn1YOoqjOebdkfDI9G0OdPDkVZhkU6HTgndeGK+G5IQY2EG DPmUtGiA7SwJ48f9L17/MXnoBgserftBeLN0yVvBE1KRkHjAni/l91ubv20Ez+EPM6px aQ2Q== X-Gm-Message-State: APt69E0RjF7jksXAwItwhpbMTe3RSnLgDC74EYOIIEjDKS0JiFebmdhE yKCuM5iwEY7qOjWJYvhGbz2mEniEaLu9/z2Om8o= X-Google-Smtp-Source: ADUXVKJuGfOuXZq+NIa3pflhOP+xUo9nT7oMU8UOjsioB+DjrvS6hu4x81nEF4VWzdwaPAcSdklDyQ5MUU8lUqSTonY= X-Received: by 2002:a2e:989:: with SMTP id 131-v6mr89958ljj.105.1529689977338; Fri, 22 Jun 2018 10:52:57 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::229 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117254 Archived-At: Hello Aur=C3=A9lie, On Fri, Jun 22, 2018 at 1:38 PM Aur=C3=A9lien Aptel wrote: > > That's because lists are cons: (list 1 2 3) and (cons 1 (cons 2 (cons > 3 nil))) eval to the same thing. > Yes. Thank you. I realized that after I looked at C-h f type-of: > Return a symbol representing the type of OBJECT. > The symbol returned names the object=E2=80=99s basic type; So the "basic" is the key :) > Perhaps you'll find Philip's doc useful: > https://phst.github.io/emacs-modules#type_of > Yes! That's where I figured out the relationship between env->type_of and type-of. @Philipp Can that documentation be made part of the Emacs Manual? It's really useful for folks like me who don't know C. In your doc, you say: > Because the module API is a C API, you have to be familiar with C to write Emacs modules. But that doesn't seem to be the case for me :) Nim provides enough abstraction to use this API and make the code readable just like Python. This is what I am working on[1]. [1]: https://github.com/kaushalmodi/nim-emacs-module/blob/test-whole-emacs-modul= e/test/modtest.nim --=20 Kaushal Modi