From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: Philipp Stephani
Newsgroups: gmane.emacs.help
Subject: Re: [modules] Possible return values of the env->type_of?
Date: Tue, 25 Dec 2018 17:13:19 +0100
Message-ID:
References:
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1545754316 9019 195.159.176.226 (25 Dec 2018 16:11:56 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 25 Dec 2018 16:11:56 +0000 (UTC)
Cc: help-gnu-emacs ,
=?UTF-8?Q?Aur=C3=A9lien_Aptel?=
To: Kaushal Modi
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 25 17:11:51 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 1gbpJ8-0002Cq-Ga
for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Dec 2018 17:11:50 +0100
Original-Received: from localhost ([127.0.0.1]:41909 helo=lists.gnu.org)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from )
id 1gbpLE-0000fI-S9
for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Dec 2018 11:14:00 -0500
Original-Received: from eggs.gnu.org ([208.118.235.92]:54438)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1gbpKm-0000fB-Jv
for help-gnu-emacs@gnu.org; Tue, 25 Dec 2018 11:13:33 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1gbpKl-0000Bh-Td
for help-gnu-emacs@gnu.org; Tue, 25 Dec 2018 11:13:32 -0500
Original-Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]:41387)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
(Exim 4.71) (envelope-from )
id 1gbpKl-00009e-OC
for help-gnu-emacs@gnu.org; Tue, 25 Dec 2018 11:13:31 -0500
Original-Received: by mail-oi1-x22b.google.com with SMTP id j21so11619633oii.8
for ; Tue, 25 Dec 2018 08:13:31 -0800 (PST)
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=Ym7orSjSgtTV0Cxiai8JSZ003MZI8ppI5Q6uh90PLT0=;
b=Jt0wEoCJzsbkXNEWo6eHOjzzfoVa6oftWEy38ieClC1VjvguVwmMxZIaXxE+59B517
WFbnoGfJxSTJKKhrbo4B+EJJ8eOzLmmi+zwaHt9x9GZaOAGcsaSXgpzRNN5NeGkMDjSr
dyUCa2I8nakh7h1BN0313mP+avgTlboLu1hDQGhRxwiM1rC+RwWtQNn1Hg3v3O6p1vIv
zQHMMqJj6HRPzuxzcHVFYcvLGMtUheGlUDBAdtZV+L5Ix3a1b4aa/SfSB29Jc0MLwqTu
qUgx9r1pPjpOoqbd4WdiQf3e8mZrPvwXo5C+Ph73upmSQbhD03oFP95HtXRGV0jWfMR+
1uVA==
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=Ym7orSjSgtTV0Cxiai8JSZ003MZI8ppI5Q6uh90PLT0=;
b=lyHG/aCBzjd5Hbto64yKAqI6AIuLa9RrdnNKKVPIOI7ZeZonukH+aqLBsB2p9QImix
RUvq4ZBOSq2Gq6UNeK9LyxtGWI4AymCxQJJH10Hm++qYBYtO0ghfyNYGSY+cIysxcqy0
WWsvuECdYuxUKTdfHIWSRJDhn2G5NXCTnHFjRZqeDG4HE6v+PBa76og7B2+Kq4AoCxAl
M6/UuFocngPPYjK0znV7v50KS2RkanBVdu8K5hatKCE52ea07fgAfxuy+KWeqmFv3jAo
FY+1ZxNQpKuUVtFcW6LJ+FdNFb09vp4ymy5t02w3th3bWb91q1GWhcpCo/2Iu7ej/0mT
avjg==
X-Gm-Message-State: AA+aEWZDf479uW2elrv5UppmoSzafhAUylvfc8hSGj+e5RVw5GABZsdl
/csLIWziTU6UypHbJ9w8Pwknnlyo9pvsHqgsdJI=
X-Google-Smtp-Source: AFSGD/XKtv/iKNSYJfZlBiJIAf42lwUPqSHK7CEzew70dQKmyeMaGMWpjCnLiHqy7/i+OQfdo0m/GaLRxI22tfBYGlw=
X-Received: by 2002:aca:c413:: with SMTP id u19mr10255014oif.209.1545754410591;
Tue, 25 Dec 2018 08:13:30 -0800 (PST)
In-Reply-To:
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
recognized.
X-Received-From: 2607:f8b0:4864:20::22b
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:119040
Archived-At:
Am Fr., 22. Juni 2018 um 19:52 Uhr schrieb Kaushal Modi
:
>
>> 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?
Eli has now written a manual section about modules, which should
contain similar information.
> 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-module/test/modtest.nim
That's great! What I mean is "you have to know enough about syntax and
semantics of C to use the module API correctly", not "you have to know
every detail of C". In particular, the lifetime and threading issues
are quite subtle.