ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Stephen Gaito <stephen@perceptisys.co.uk>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Using ConTeXt-LMTX for modern Mathematically-Literate-Programming 2/2
Date: Thu, 3 Dec 2020 10:43:25 +0000	[thread overview]
Message-ID: <20201203104325.238dd32f@nn01> (raw)
In-Reply-To: <78fa9e35-40ef-3fa0-6525-2230cd817a4e@xs4all.nl>

Hans,

If my only constraints were ease of programming and moderate
performance, I would completely agree that using mostly Lua plus
(possibly) some C code for some targeted stuff that is really slow in
Lua is the correct solution.... we are actually in agreement.

Unfortunately, I have the *non-functional* requirement to *prove* the
code's correctness.... this is the heart of what I have to write about.

There is no getting out of this requirement....

So, some day it would be very useful to be able to directly embed a
Lua wrapped ANSI-C shared library inside the new LuaMetaTex....

However, at the moment, as part of my parallelization attempts I can
interact with my ANSI-C code over a network.... so I will use this
approach for the near to medium time frames.

Regards,

Stephen Gaito



On Wed, 2 Dec 2020 14:17:54 +0100
Hans Hagen <j.hagen@xs4all.nl> wrote:

> On 12/2/2020 11:43 AM, Stephen Gaito wrote:
> 
> > Again, to my knowledge, Lua v5.4 has only one implementation (though
> > this implementation *can* be compiled for a very wide range of
> > CPU's).  
> 
> Lua has not many demands ... it can even run on tiny cpu's. It's all 
> rather plain C code. (And in luametatex we have no c++ ... all is
> just C.)
> 
> > Finally, the computational complexity of my proof engine, will be
> > comparable to MetaFun/MetaPost... which I suspect you would not
> > consider implementing in pure Lua. Some things are faster in C.  
> 
> Hard to say ... I think that the parser / expansion machinery in mp
> is the bottleneck here (no fun to do that in lua). Redoing it in Lua
> also is asking for compatibility issues. (btw, extensions are done in
> lua anyway, as is the mp backend)
> 
> > So yes I do need to implement it in ANSI-C wrapped in Lua (so that
> > it can be used from *inside* ConTeXt).  
> 
> I would have to see the 'kind of code involved' in order to comment
> on that.
> 
> An option is to do most in lua and maybe some helpers for crititical 
> code in C.
>   Hans
> 
> 
> -----------------------------------------------------------------
>                                            Hans Hagen | PRAGMA ADE
>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>         tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2020-12-03 10:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30  9:51 Stephen Gaito
     [not found] ` <83c1393f-f11e-9260-9593-16c6f8c42189@xs4all.nl>
2020-12-02 10:43   ` Stephen Gaito
2020-12-02 13:17     ` Hans Hagen
2020-12-03 10:43       ` Stephen Gaito [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201203104325.238dd32f@nn01 \
    --to=stephen@perceptisys.co.uk \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).