Wenyan: wypm: Package Management for Wenyan Lang

Created on 9 Jan 2020  ·  11Comments  ·  Source: wenyan-lang/wenyan

Hi everyone!

To help people make 3-rd party libraries (#509, #451, #452), I made a minimal package management tool for wenyan lang:

wyg, 文淵閣 - https://github.com/antfu/wyg

you can try it out:

npm i -g @antfu/wyg

wyg i 子曰

by running commands above, it will install the package 子曰 to 藏書樓/子曰 to the current directory.

Notes

  • 藏書樓 is kind like node_modules in Node.js
  • 序.wy is kind like index.js in Node.js, this can achieve hierarchical imports without './some/nested/module' syntax.
  • Currently, 藏書樓 and 序.wy will not be handled correctly (Which means the packages can not be imported yet). I will keep working on #499 to make it work. Supported in v0.2.2!
  • Publish your own packages is already possible. Please refer to the homepage of wyg
  • This is just a quick prototype, if you like this idea, I will keep improving it.
  • A browser version is also possible.

Please let me know what you think! Thanks.

EDIT: change wypm to wyg

cli contributor-tools

Most helpful comment

👍Great! This is so awesome!

My only suggestion is that we can change some wording here, e.g. 藏經閣->藏書樓, and perhaps we can think of a creative name for this tool. I like how wypm is reminiscent of npm, but I wonder if there're some missed opportunities here. Here's just one idea from the top of my head: wyg, which can be either interpreted as initial letters of 文淵閣 or wenyan-get(parody of apt-get). As always, more ideas are very welcome!


Cowsay usually has a cow in it, I think ziyue needs a Confucius! I happen to have made one for anther project, so here you go:

                  __._
                 / ___)_
                (_/Y ===\
                |||.==. =).
                |((| o |p|
             _./| \(  /=\ )
           /  |@\ ||||||||.
          /    \@\ ||||||||\
         /   \  \@\ ||||||//\ 
        (     Y  \@\|||| // _\
        |    -\   \@\ \\//    \
        |     -\__.-./ //\.---.^__
        | \    /  |@|__/\_|@|  |  |
        \__\      |@||| |||@|     |
        <@@@|     |@||| |||@|    /
       / ---|     /@||| |||@|   /
      |    /|    /@/ || |||@|  /|
      |   //|   /@/  ||_|||@| / |
      |  // \ ||@|   /|=|||@| | |
      \ //   \||@|  / |/|||@| \ |
      |//     ||@| /  ,/|||@|   |
      //      ||@|/  /|/||/@/   |
     //|   ,  ||//  /\|/\/@/  / /
    //\   /   \|/  /H\|/H\/  /_/
   // |\_/     |__/|H\|/H|\_/
  |/  |\        /  |H===H| |
      ||\      /|  |H|||H| |
      ||______/ |  |H|||H| |
       \_/ _/  _/  |L|||J| \_
       _/  ___/   ___\__/___ '-._
      /__________/===\__/===\---'

All 11 comments

👍Great! This is so awesome!

My only suggestion is that we can change some wording here, e.g. 藏經閣->藏書樓, and perhaps we can think of a creative name for this tool. I like how wypm is reminiscent of npm, but I wonder if there're some missed opportunities here. Here's just one idea from the top of my head: wyg, which can be either interpreted as initial letters of 文淵閣 or wenyan-get(parody of apt-get). As always, more ideas are very welcome!


Cowsay usually has a cow in it, I think ziyue needs a Confucius! I happen to have made one for anther project, so here you go:

                  __._
                 / ___)_
                (_/Y ===\
                |||.==. =).
                |((| o |p|
             _./| \(  /=\ )
           /  |@\ ||||||||.
          /    \@\ ||||||||\
         /   \  \@\ ||||||//\ 
        (     Y  \@\|||| // _\
        |    -\   \@\ \\//    \
        |     -\__.-./ //\.---.^__
        | \    /  |@|__/\_|@|  |  |
        \__\      |@||| |||@|     |
        <@@@|     |@||| |||@|    /
       / ---|     /@||| |||@|   /
      |    /|    /@/ || |||@|  /|
      |   //|   /@/  ||_|||@| / |
      |  // \ ||@|   /|=|||@| | |
      \ //   \||@|  / |/|||@| \ |
      |//     ||@| /  ,/|||@|   |
      //      ||@|/  /|/||/@/   |
     //|   ,  ||//  /\|/\/@/  / /
    //\   /   \|/  /H\|/H\/  /_/
   // |\_/     |__/|H\|/H|\_/
  |/  |\        /  |H===H| |
      ||\      /|  |H|||H| |
      ||______/ |  |H|||H| |
       \_/ _/  _/  |L|||J| \_
       _/  ___/   ___\__/___ '-._
      /__________/===\__/===\---'

Wow! I love the 文淵閣 and wenyan-get paronomasia! If we go for wyg I maybe the 藏經閣 or 藏書樓 can become 文淵閣 as well.


If you agree with the package management idea, should we also include the 藏經閣/藏書樓/文淵閣 into the CLI default importPaths as Node.js did (up searching). And for the 序.wy functionality, should I work on #499 or create another PR?


Cowsay usually has a cow in it, I think ziyue needs a Confucius! I happen to have made one for anther project, so here you go

It was a quick "helloworld" for testing the install function. And I am just trying to create the ascii art for Confucius! You did a wonderful job (he looks cute!). Will use it and credit to you. Thanks!

And I am just trying to create the ascii art for Confucius!

Sorry to rob you of the fun :P

If we go for wyg I maybe the 藏經閣 or 藏書樓 can become 文淵閣 as well.

I think 文淵閣 a proper noun and is more like the official repository of packages, and 藏書樓 is more like a local collection, so I would suggest keeping 藏書樓 as node_modules.

Some more thoughts: 文淵閣 is historically for royal collection and not for distributing books though. 武英殿 is for 官刻, which, coincidentally, also has initial letters starting with wy. And perhaps the pun for wyd can be wenyan-distribute. (I don't like the sound of 武英 though, seems to relate little to literature, what were they thinking :P)

Other potential names could be historical names of 書店(selling) or 書坊(printing). Or perhaps 四庫, a collection of books.

Just added the Confucius for ziyue!

I think 文淵閣 a proper noun and is more like the official repository of packages, and 藏書樓 is more like a local collection, so I would suggest keeping 藏書樓 as node_modules.

Sure that makes sense!

Some more thoughts: 文淵閣 is historically for royal collection and not for distributing books though. 武英殿 is for 官刻, which, coincidentally, also has initial letters starting with wy. And perhaps the pun for wyd can be wenyan-distribute. Other potential names could be historical names of 書店(selling) or 書坊(printing). Or perhaps 四庫, a collection of books.

Thanks for the detailed explanation! I would prefer wenyan-get and 文淵閣 then 武英殿 and wenyan-distribute coz the former looks more intuitive for me who is not well-educated XD

Anyway, since I am not good at literal, I better leave the decisions to you and viewers who get interested. And I should probably close Github and go read some books. 😂

I haven't read many books of the ancients, but I have done shallow research about this on the web.

FYI, I have two repo for wypm now. On for the tool itself and one for registry (antfu/wypm-registry).

Imo, 文淵閣 sounds more like the registry and the wypm seems to play more 官刻 role. But just like you mentioned, I don't like how 武英 sounds either. Or maybe we can map the 官刻 idea to install someways.

(PS. 文淵閣 seems to be a perfect name and pun to me, I just can't not to think about it XP.

I think perhaps we can keep 文淵閣 for the tool itself, and translate the registry as 總目 or 目錄 (or less appropriately, 花名冊)?

Should the registry be something like 文淵閣總目 or 文淵閣總綱? I am not sure whether it's proper usage. But I think it makes them look more relevant.

@LingDong- I have changed it to wyg, 文淵閣 🎉. And it now functions well with v0.2.3!

Should we consider make wyg an official tool for Wenyan Lang? I have also reserved the Github organization wenyan-lang if you are interested. :)

Thanks, and 🎉!

  • I think 文淵閣總目 is nice.
  • Let's make wyg official!
  • Shall we move this project under wenyan-lang organization, and have all the other related tools under it? Just wondering if it will this be a big hassle? Will those who previously watch/star/etc the project not be able to path find to it? Will those who had the old link to this project be automatically/manually redirected? Just listing my concerns here :P I'll investigate tomorrow, right now I need to push some progress and get some sleep.

@LingDong- If we transfer it to the organization everything should work fine. The all the things(issue/start/pr) will be moved to the new repo seamlessly. Links will be auto redirected. I think Github handles this very well. Anyway, it's always better to be prepared!

And I will transfer wyg to the org then (also as a test 😄).

Good night!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nobodxbodon picture nobodxbodon  ·  3Comments

jefrydco picture jefrydco  ·  3Comments

DonkeXu picture DonkeXu  ·  5Comments

zxch3n picture zxch3n  ·  5Comments

OliverS18 picture OliverS18  ·  3Comments