V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
xieyuheng
V2EX  ›  程序员

iNet 一个基于图论的程序语言

  •  
  •   xieyuheng ·
    xieyuheng · 236 天前 · 1131 次点击
    这是一个创建于 236 天前的主题,其中的信息可能已经有所发展或是发生改变。

    项目主页: https://inet.run

    源代码: https://github.com/cicada-lang/inet

    中文文档: https://readonly.link/articles/https://cdn.inet.cic.run/docs/articles/反应网编程.md

    语言基于一个令人耳目一新的计算模型,叫做 Interaction Nets (反应网)。

    欢迎大家分享给正在学计算机的朋友 :)

    也许可以拓展对计算模型的理解。

    11 条回复    2023-09-24 01:03:35 +08:00
    sora2blue
        1
    sora2blue  
       235 天前
    看起来像是用可视化的方式抽象计算的过程,然后找出其中可以并行的计算?
    `(cons :tail) ` `'A List`,这很 lisp
    MstMoonshine
        2
    MstMoonshine  
       235 天前 via iPhone
    有点像物理学用的 tensor network ,区别是 tensor network 只支持 linear operation
    xieyuheng
        3
    xieyuheng  
    OP
       235 天前
    @sora2blue 其实可视化不是重点,原论文中 Lafont 都没写可是化的程序,只是简单画图介绍。

    重点是,这个计算模型中,任何一步计算都可以相互独立地进行,
    因此非常适合用并行计算的方式来实现。

    ( lisp 和 scheme 是咱刻在 DNA 里的东西,哈哈哈)
    xieyuheng
        4
    xieyuheng  
    OP
       235 天前
    @MstMoonshine 确实,我第一次看到这个论文的时候,也联想到了很多。不得不说 Lafont 这个论文确实有点东西的。

    另外,如果大家感兴趣的话,我的代码仓库里有论文原文:
    https://github.com/cicada-lang/inet/tree/master/docs/references/papers

    还有一本书,里面介绍了很多计算模型(包括 iNet ):
    https://github.com/cicada-lang/inet/tree/master/docs/references/books
    MstMoonshine
        5
    MstMoonshine  
       232 天前 via iPhone
    @xieyuheng 我看到你在 HN 上也发帖了,才想起回来 check 这个帖子。

    相关内容: https://ncatlab.org/nlab/show/string+diagram
    xieyuheng
        6
    xieyuheng  
    OP
       232 天前
    @MstMoonshine

    iNet 好像确实和范畴论的 string diagram 是相关的。

    另外你这个 wiki 里有一节 In quantum computation ,
    怪不得 HN 上有人会提到。
    MstMoonshine
        7
    MstMoonshine  
       232 天前 via iPhone
    @xieyuheng 本质上是用 function composition 的结合律。我也一直在想类似的方案对 pure functions 计算进行更激进的并行处理(有 side effect 的 function 没有结合律,所以必定是 imperative 的,没办法并行)
    MstMoonshine
        8
    MstMoonshine  
       232 天前 via iPhone
    @xieyuheng 是的,很强的即视感,不过你 list 的俩 paper 是用 type system 的语言写的,没有使用 categorical 的方式写,应该有等价转换的方式
    MstMoonshine
        9
    MstMoonshine  
       232 天前 via iPhone
    @xieyuheng 另外 quantum circuit 跟我上次提到的 tensor network 要更接近一些,因为它们都支持 linear operation 。quantum circuit 除了 linear 还得是 unitary 的。
    xieyuheng
        10
    xieyuheng  
    OP
       232 天前
    @MstMoonshine 另外,如果你用 telegram 的话,我有一个讨论程序语言设计的群,欢迎加入: https://t.me/CicadaLanguageCN
    xieyuheng
        11
    xieyuheng  
    OP
       217 天前
    换成了类似 JavaScript 的语法: https://www.v2ex.com/t/976572
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1091 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 23:15 · PVG 07:15 · LAX 16:15 · JFK 19:15
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.