From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrew Hyatt Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: triples Date: Thu, 27 Oct 2022 01:19:34 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31193"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Jean Louis Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 27 07:21:39 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1onvKl-0007tG-C4 for ged-emacs-devel@m.gmane-mx.org; Thu, 27 Oct 2022 07:21:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onvIu-0007Jw-I2; Thu, 27 Oct 2022 01:19:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onvIo-0007DI-VD for emacs-devel@gnu.org; Thu, 27 Oct 2022 01:19:38 -0400 Original-Received: from mail-qk1-x732.google.com ([2607:f8b0:4864:20::732]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onvIn-0007VB-6H for emacs-devel@gnu.org; Thu, 27 Oct 2022 01:19:38 -0400 Original-Received: by mail-qk1-x732.google.com with SMTP id t25so151892qkm.2 for ; Wed, 26 Oct 2022 22:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=6o/Qduk2/oFWSEbJqEijPuzhqhkShrnLDW12qWRDSFM=; b=mRLdMUlDdtiyq3kpXKXu/rZcqjfhX+YTA6XapkwiQM4e5ijwGU26z9TvnWewjurTMh WHN48ibCV1ZW1mjUvbqm5i/ZwuWXZkCPFU58hLFsap6Dr9Wg/9HwgJELVS5kAo0E5Wti +TVrhjsQbVAwC+WzpJiw87hDkAhitlojaXjQf1frlFymX35rbyiQb6dx3kdUSNb8rsJT cJxNcn0TOlvbmgEp3HdXecmLTmav7/75xmp12gAhpbKVyyBsuQiXbse0uTQYexkOhp5V K+kMTLkxToRJmpXyW0OJ99nAUlZrut0B1KA/ulJxO2MdZJoSTBbENeF5l94WzZTtde59 XiLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6o/Qduk2/oFWSEbJqEijPuzhqhkShrnLDW12qWRDSFM=; b=U+zarreYb13mlkoMIejGvNvmlkpyP0Wl9MREVV9Vps/WkambVT2T28wMArA2KTRkvs Qf9BKX56vpkQ5VI9n3PIaWAcNyWTTsNGRDxcbs+/ZWFb2vrqUBAbab2l8mKVibN0/rWM mAmynzw1/DqklNidYt+VQ0lb/wU1lBc7VOij8XQQUc3bG/jTWbUOR/qQ/pVeozo3VB0E wzGg/rlapsY8V4rAndRH6cHIERCbUue2OffCKq8TqCo4fNs/kM5DXEsphhiQaIVUsLTs I05I8F2zv8fqNDz8fpL5UuuOsDGbRSO87I/LMF/AI7lNDS6NHt3JVaC16KtuyEb8vASx 43/g== X-Gm-Message-State: ACrzQf1R2L9xj6cIFIf3tYe/KPkJEEGaN/KIEKSJQ3oq9iqrehRvB/PR yYCqUq0ypVHkiKwkEFpK0ZtW20HAp9Q= X-Google-Smtp-Source: AMsMyM70R2/f7ABRDiIjyJ585de5xlgiSBp0QwbNNOX25vqF0a03KvL/jdi6Z9XGNFxKf7iOt62XQA== X-Received: by 2002:a05:620a:2601:b0:6bc:70bb:c56b with SMTP id z1-20020a05620a260100b006bc70bbc56bmr33786123qko.416.1666847975502; Wed, 26 Oct 2022 22:19:35 -0700 (PDT) Original-Received: from andrews-mbp.lan (pool-71-183-193-81.nycmny.fios.verizon.net. [71.183.193.81]) by smtp.gmail.com with ESMTPSA id d20-20020ac851d4000000b00399fe4aac3esm378144qtn.50.2022.10.26.22.19.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 22:19:34 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::732; envelope-from=ahyatt@gmail.com; helo=mail-qk1-x732.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:298601 Archived-At: On Thu, Oct 27, 2022 at 06:36 AM Jean Louis wrote: > * Andrew Hyatt [2022-10-26 03:59]: >> I've created a new package, triples, which can be found at >> https://github.com/ahyatt/triples. I'd like to add this to >> some ELPA, and would prefer the gnu ELPA. I will be talking >> about this package, and examples of its use, in the upcoming >> Emacs conference. > > I like the idea of relating everything to everything. > > I was experimenting with semantic triplets for PostgreSQL: > > Implementation of Semantic Triplets in PostgreSQL database: > https://hyperscope.link/3/7/1/5/4/Implementation-of-Semantic-Triplets-in-PostgreSQL-database-37154.html > > In this case any table, column, with its primary key may be > related to any other table, column with its primary key. That > way objects and subjects are constrained and rigid, it is not > universal triplets, but database tables dependent one. It > relates only what exists in the database. If there is `people' > database then such may be related to arbitrary other tables like > `statistics'. Thanks for mentioning this, it's an interesting design I'll read up on! > > You have made general triplets to build any type of knowledge > that is nice. > > Triplets allow huge flexibility in relation assignments. > > I just wonder if your "types" can simply be replaced again with > predicates. > > select * from predicates; > predicates_id | predicates_name | predicates_description > ---------------+-----------------+----------------------------------- > 1 | is | When subject is object. 2 | > knows | When subject knows object. 3 | > registered | When subject registered an object > > by adding "has" predicate, one can tell: > > person has age person has name employee has id id is integer > employeee has manager employee is person manager is person We have "has" but not "is". The schema has types, those types have properties. So we can have a subject, "Joe Employee", who has a type person, and a type employee, and a type manager, the properties of those respective types. But we don't know or enforce that every employee is also a person. It's perhaps a feature that can be added later if needed; it seems possible in the current implementation. > > -- > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > In support of Richard M. Stallman > https://stallmansupport.org/