iNet 一个基于图论的程序语言 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
请不要在回答技术问题时复制粘贴 AI 生成的内容
xieyuheng
V2EX    程序员

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

  •  
  •   xieyuheng
    xieyuheng 2023-09-04 22:01:00 +08:00 1838 次点击
    这是一个创建于 766 天前的主题,其中的信息可能已经有所发展或是发生改变。

    项目主页: 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  
       2023-09-05 09:11:46 +08:00
    看起来像是用可视化的方式抽象计算的过程,然后找出其中可以并行的计算?
    `(cons :tail) ` `'A List`,这很 lisp
    MstMoonshine
        2
    MstMoonshine  
       2023-09-05 12:50:02 +08:00 via iPhone
    有点像物理学用的 tensor network ,区别是 tensor network 只支持 linear operation
    xieyuheng
        3
    xieyuheng  
    OP
       2023-09-05 12:53:04 +08:00
    @sora2blue 其实可视化不是重点,原论文中 Lafont 都没写可是化的程序,只是简单画图介绍。

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

    ( lisp 和 scheme 是咱刻在 DNA 里的东西,哈哈哈)
    xieyuheng
        4
    xieyuheng  
    OP
       2023-09-05 12:56:13 +08:00
    @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  
       2023-09-08 12:01:15 +08:00 via iPhone
    @xieyuheng 我看到你在 HN 上也发帖了,才想起回来 check 这个帖子。

    相关内容: https://ncatlab.org/nlab/show/string+diagram
    xieyuheng
        6
    xieyuheng  
    OP
       2023-09-08 12:26:10 +08:00
    @MstMoonshine

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

    另外你这个 wiki 里有一节 In quantum computation ,
    怪不得 HN 上有人会提到。
    MstMoonshine
        7
    MstMoonshine  
       2023-09-08 12:27:41 +08:00 via iPhone
    @xieyuheng 本质上是用 function composition 的结合律。我也一直在想类似的方案对 pure functions 计算进行更激进的并行处理(有 side effect 的 function 没有结合律,所以必定是 imperative 的,没办法并行)
    MstMoonshine
        8
    MstMoonshine  
       2023-09-08 12:29:05 +08:00 via iPhone
    @xieyuheng 是的,很强的即视感,不过你 list 的俩 paper 是用 type system 的语言写的,没有使用 categorical 的方式写,应该有等价转换的方式
    MstMoonshine
        9
    MstMoonshine  
       2023-09-08 12:31:07 +08:00 via iPhone
    @xieyuheng 另外 quantum circuit 跟我上次提到的 tensor network 要更接近一些,因为它们都支持 linear operation 。quantum circuit 除了 linear 还得是 unitary 的。
    xieyuheng
        10
    xieyuheng  
    OP
       2023-09-09 01:28:31 +08:00
    @MstMoonshine 另外,如果你用 telegram 的话,我有一个讨论程序语言设计的群,欢迎加入: https://t.me/CicadaLanguageCN
    xieyuheng
        11
    xieyuheng  
    OP
       2023-09-24 01:03:35 +08:00
    换成了类似 Javascript 的语法: t/976572
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     5796 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 29ms UTC 06:16 PVG 14:16 LAX 23:16 JFK 02:16
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86