(评论)
(comments)

原始链接: https://news.ycombinator.com/item?id=43945665

Mycelium 是一种新型序列化格式,旨在解决与 Protocol Buffers 和 JSON 类似的问题。它基于比特构建,其中所有内容,从字节到字符串和整数,都表示为比特数组或列表。除了典型的序列化之外,Mycelium 还支持跨网络发送过程(Lambda),这需要机器码规范和抽象机器模型。其关键特性包括和类型(Coproduct)和加密指针 (Refs) 用于安全的数据处理。 潜在应用包括: * 数据存储和传输的序列化格式。 * 用于安全运行不受信任代码的虚拟机 (VM)。 * 编程语言(如 Spore)的编译目标。 * 用于密码学签名数据结构(Merkle 树)的格式。 * 通过加密指针高效同步大型数据结构的机制。

相关文章
  • (评论) 2025-03-25
  • Show HN: 菌丝体 2025-05-14
  • (评论) 2025-03-27
  • (评论) 2025-03-20
  • (评论) 2025-04-21

  • 原文
    Hacker News new | past | comments | ask | show | jobs | submit login
    Show HN: Mycelium (github.com/mycweb)
    34 points by brendoncarroll 22 hours ago | hide | past | favorite | 6 comments










    > Mycelium is a set of typed formats for storing and transferring data. As you might expect it supports things like

    I did not expect that, as I am not in your world. Your project would benefit with a better description and context on what this is about and what the use cases are.



    The serialization format solves a similar problem to Protocol Buffers or JSON. If you haven't heard of either of those, then Mycelium might not solve a problem that you care about. Just after your quote the README mentions things like Products and Lists which both Protocol Buffers and JSON have support for in the form of Messages/Repeated and Objects/Lists respectively.

    Mycelium has some interesting design choices compared to JSON and Protocol Buffers. Everything is built up from Bits, there is a Bit type which contains the values 0 and 1. Bytes are `Array[Bit, 8]` and Strings are `List[Byte]`. A 32 bit integer would be `Array[Bit, 32]`. There are also Sum (Coproduct) types, and cryptographic pointer types (called Refs in Mycelium).

    Mycelium can be used to solve the same problems as those technologies. That's sort of table stakes for a serialization format. Mycelium additionally tackles the problem of sending procedures (called Lambdas in Mycelium) over the wire as well. That is a fairly simple feature to explain (get my procedure from here to there, it works with strings why not functions?), but it implies a significant amount of technology including a machine code specification and abstract machine model to execute it.

    As for practical applications. Mycelium is suitable to be used as:

    - A serialization format for storage and transfer.

    - A VM with well controlled access to external resources for applications to run untrusted code.

    - The VM can be a compiler target for programming languages. (Spore https://github.com/mycweb/mycelium/tree/master/spore is one such language)

    - A format for data structures which need to be cryptographically signed. All Mycelium data structures are Merkle Trees.

    - Large data structures which need to be efficiently synced. All Mycelium Values can be synced efficiently by traversing the cryptographic pointers and skipping values which are already available locally.



    Very much agree. From the readme it sounds like there is a lot to this project, but I had a lot of trouble understanding why/where I would use this in the first place, or how it could improve on existing technologies.


    It sounds to me like it's the same sort of thing as protobuf.


    Sounds neat. I'd love to see some example applications that use the P2P messaging layer.


    I'm curious to learn more about this.






    Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact



    Search:
    联系我们 contact @ memedata.com