Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ZIP to stdlib #318

Closed
juancarlospaco opened this issue Jan 17, 2021 · 17 comments
Closed

Add ZIP to stdlib #318

juancarlospaco opened this issue Jan 17, 2021 · 17 comments

Comments

@juancarlospaco
Copy link
Contributor

Add back ZIP to stdlib.

Pure-Nim or impure, but still even impure is better than calling 7zip.exe via system shell or packing stuff using staticRead.

Can be adding some nimble package to stdlib, or a new one, or an impure like C wrapper, etc.

Can help improve http of stdlib, installer/setup related stuff, is used on a lot of formats, and more.

API can be basic, at least to compress / decompress.

@disruptek
Copy link

What's wrong with https://github.com/guzba/zippy?

@c-blake
Copy link

c-blake commented Jan 17, 2021

As limited as "deflate" is (e.g., Zstd is much better), I'd say including zippy (the pure-Nim fork of @juancarlospaco's or) in the stdlib might add more value than many things already there. This runs head first into how to evolve the stdlib questions, which I think landed on "just grow the stdlib".

@disruptek
Copy link

disruptek commented Jan 18, 2021

If you put zippy in the stdlib, you've turned one problem into two problems.

Deprecate the nim-lang/zip and point people to zippy. Now there's no problem.

@c-blake
Copy link

c-blake commented Jan 18, 2021

Sounds like two problems to me either way 😄. "Package manager people" often over-discount the extra burden for other people of outside the stdlib stuff. And yeah people can also still not know it's in the stdlib, but many stdlibs have it at least in wrapper-of-zlib form. And @Araq was mentioning having stdlib depend upon it for more complete HTTP support. And we are still figuring out how to have stdlib/compiler depend upon 3rd party packages. So, anyway, like I said - "head first into how to evolve the stdlib" upon which reasonable people have disagreed and changed their minds over the years. 😄

@disruptek
Copy link

Deprecate the nim-lang/zip and point people to zippy.

This forwards everyone's goals without regard to the evolution of the stdlib. What comes next can be bikeshed by the naysayers.

@c-blake
Copy link

c-blake commented Jan 18, 2021

I love the positivity, but I also don't see how it moves forward portable support for Content-encoding: gzip in stdlib HTTP until stdlib can depend on a 3rd party package. (Unless forcing resolution of such dependency sooner rather than later is a +.)

@disruptek
Copy link

If you're not for deprecating nim-lang/zip, then you're against it. Why?

@c-blake
Copy link

c-blake commented Jan 18, 2021

I am for the portable (as in no external zlib required) support for Content-encoding: gzip which to me means either zippy in the stdlib or stdlib depending on external stuff.

@c-blake
Copy link

c-blake commented Jan 18, 2021

(I guess I should say that I have not reviewed zippy for CPU/OS portability, but it seems at least do-able in theory and is currently a very small module.)

@juancarlospaco
Copy link
Contributor Author

juancarlospaco commented Feb 9, 2021

I did not say something is wrong with anything, I say we are calling 7zip.exe via system shell to unzip stuff. 😐

That promise that useful stuff will be added to the stdlib never fulfilled the objective, with or without Fusion. 😢

New users often choose D lang for the useful rich stdlib, but Nim struggles for years to add basic stuff to stdlib.

@mratsim
Copy link
Collaborator

mratsim commented Feb 9, 2021

I did not say something is wrong with anything, I say we are calling 7zip.exe via system shell to unzip stuff. neutral_face

That's a significant security risk.

@juancarlospaco
Copy link
Contributor Author

Yes, I think that can be improved; Would be useful for basic HTTP compression support.

@juancarlospaco
Copy link
Contributor Author

DocGen can generate Ebook documentation without changes to the docgen code,
because epub is just HTML/CSS in a ZIP, docgen already does HTML/CSS. 🤔

@ringabout
Copy link
Member

ringabout commented Feb 16, 2021

Related feature request:
asynchttpserver: nim-lang/Nim#9175
httpclient: nim-lang/Nim#7864

@c-blake
Copy link

c-blake commented Feb 16, 2021

Related Forum thread.

@juancarlospaco juancarlospaco mentioned this issue May 13, 2022
33 tasks
@arnetheduck
Copy link

gzip in stdlib HTTP until stdlib can depend on a 3rd party package.

This actually has a trivial solution: move the http support to a library which can depend on gzip (and release gzip support separately from a nim release, at its own leisure).

An example can be found in nim-websock which adds compression / deflate to websockets without any further library additions.

@Araq
Copy link
Member

Araq commented Oct 14, 2022

The correct solution is indeed to move the HTTP stuff out of the stdlib so that it can evolve much more easily.

@Araq Araq closed this as completed Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants