Two Wasm programming languages in one app: Odin + Nim

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ม.ค. 2025

ความคิดเห็น • 25

  • @BrazilMentionedHueHue
    @BrazilMentionedHueHue 20 ชั่วโมงที่ผ่านมา +4

    No "Hellope from Odin!" ?? Unreadable

  • @andrewdunbar828
    @andrewdunbar828 วันที่ผ่านมา +2

    Actually gzipped tar files don't have a directory but you can start at the beginning and unzip one entry at a time and stop when you get the one you want. You don't have to unzip the whole thing. So not as good as Zip but not as bad as it could be.

    • @contextfree
      @contextfree  วันที่ผ่านมา +1

      Thanks much for the thoughts on that!

    • @andrewdunbar828
      @andrewdunbar828 วันที่ผ่านมา +1

      @@contextfree Can be useful if you mess around with the raw binary formats as I happened to do a couple of times recently. Not sure how many libraries currently make use of this.

    • @geegoo
      @geegoo 22 ชั่วโมงที่ผ่านมา +2

      ​@@contextfree Idk how it actually works/achieves this goal, but a decent Linux utility that I happened to use for not extracting the whole tar is ratarmount. It has a preparation step where it builds an SQL db/file of some kind, but it can then mount the tar as a filesystem, and you can navigate it, and also copy only the file you need. The building step is insignificant compared to what it would take to extract the whole tar (it was a several GB backup of my $HOME and needed only one config file)

    • @contextfree
      @contextfree  22 ชั่วโมงที่ผ่านมา +2

      I hadn't heard of that. Thanks for the info! They say this: "Ratarmount collects all file positions inside a TAR so that it can easily jump to and read from any file without extracting it." Also: "Highly Parallelized: By default, all cores are used for parallelized algorithms like for the gzip, bzip2, and xz decoders." So I think they do decompress just to find seek points and without storing the decompressed data anywhere, so it's just a fast parallel loop. And then they remember where the starts are. My best understanding at a glance. Nice to have tools out there that can do such things.

    • @andrewdunbar828
      @andrewdunbar828 21 ชั่วโมงที่ผ่านมา +2

      @@geegoo Interesting! I was going to include in my comment that you could even make an external index of the contents of the gzipped tar but thought it would be too uncommonly wanted (-: I do something similar with .bz2 files.

  • @Br4dButt0wski
    @Br4dButt0wski 22 ชั่วโมงที่ผ่านมา +1

    Did you enjoy writing nim and odin at the same time?

    • @contextfree
      @contextfree  21 ชั่วโมงที่ผ่านมา

      They had their pros and cons. I tend to think of Nim as a bit higher level than Odin, so I was subverting my own defaults by building the tooling in Nim then the app in Odin. How about one pro & one con for each, some mentioned in the video. For Nim: Pro that it's easy to get memory management and text formatting at small size. Con that that likes to make deep copies by default, and I've got to watch out for things like that. For Odin: Pro that it's easy to be precise and clean at the same time including the context idea. Con that the build times and sizes grew more than I liked as I used more standard library.

    • @contextfree
      @contextfree  21 ชั่วโมงที่ผ่านมา

      If I were to build say a 2D game framework for Taca, for example, I'm trying to imagine which language I'd use. Not sure yet. But I'd be tempted to try something other than Rust, even though I like Rust. But whatever language I used, it's nice to know that people could use it from whatever language they wanted. (I'm also not committing even to making such a thing. Just thinking about it as an example.)

  • @Germisstucklmao
    @Germisstucklmao วันที่ผ่านมา +1

    Where does the export wasm pragma come from? Is it custom or did I miss it in the docs?

    • @contextfree
      @contextfree  วันที่ผ่านมา

      For which language?

    • @contextfree
      @contextfree  วันที่ผ่านมา

      Meanwhile, I actually use WASM-4 templates as one of my primary references when trying a new language with Taca. Taca doesn't use the same constraints as WASM-4, so some things need to change, but it's still good for me when getting started. github.com/aduros/wasm4/tree/main/cli/assets/templates

    • @contextfree
      @contextfree  วันที่ผ่านมา

      And then once I have a working build in Taca, I have my own reference. I also have a Containerfile/Dockerfile for compilers in the Taca repo, so all Taca build instructions are fully repeatable.

    • @contextfree
      @contextfree  วันที่ผ่านมา

      And if you mean for Nim, I copied a macro from the WASM-4 template.

  • @Kapendev
    @Kapendev วันที่ผ่านมา +4

    No Ada?

    • @contextfree
      @contextfree  วันที่ผ่านมา

      Might be doable. blog.adacore.com/designing-a-webassembly-toolchain-for-ada

  • @familyfriendlymikey
    @familyfriendlymikey วันที่ผ่านมา +3

    firts

  • @AK-vx4dy
    @AK-vx4dy วันที่ผ่านมา +1

    You are playing dangerous ;)

    • @contextfree
      @contextfree  วันที่ผ่านมา +3

      How so?

    • @AK-vx4dy
      @AK-vx4dy วันที่ผ่านมา +3

      @@contextfreeSuch mix, communities can feel obligated to boil slightly ;)

    • @contextfree
      @contextfree  วันที่ผ่านมา +1

      Got it, although I suppose I could have chosen a more volatile mix if I really wanted to be exciting. :)

    • @AK-vx4dy
      @AK-vx4dy 21 ชั่วโมงที่ผ่านมา +1

      @@contextfree Oh yes definitely you could 😜, i saw you even used 8 to Godot 😉
      But you often compare languages so maybe your audience is somewhat immune.

  • @naranyala_dev
    @naranyala_dev วันที่ผ่านมา +1

    waiting for c3

    • @contextfree
      @contextfree  21 ชั่วโมงที่ผ่านมา

      Gotta keep on movin'. Still more languages out there to try for next demos.