unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Guile-zstd 0.1.0 released
@ 2020-12-27 14:01 Ludovic Courtès
  2020-12-27 15:00 ` Guile-zstd 0.1.1 released Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2020-12-27 14:01 UTC (permalink / raw)
  To: guile-user, guix-devel, guile-sources

[-- Attachment #1: Type: text/plain, Size: 860 bytes --]

Hi!

I’m pleased to announce the first release of Guile-zstd:

  git clone https://notabug.org/guile-zstd/guile-zstd
  cd guile-zstd
  git checkout v0.1.0  # or 0d830f53e2a2bb71799aeda4be7101a09d060f99
  git tag -v v0.1.0

The ‘git tag -v’ command checks the authenticity of your checkout.
You may need to retrieve the signing key first:

  gpg --keyserver pool.sks-keyservers.net \
      --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

Guile-zstd provides Guile 3.0/2.x bindings to the zstd (or “zstandard”)
compression library.

You can report bugs and send patches to <guile-user@gnu.org> or on the
web site:

  https://notabug.org/guile-zstd/guile-zstd

If you like Guile-zstd, you may also like these:

  https://notabug.org/guile-lzlib/guile-lzlib
  https://notabug.org/guile-zlib/guile-zlib

:-)

Ludo’.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Guile-zstd 0.1.1 released
  2020-12-27 14:01 Guile-zstd 0.1.0 released Ludovic Courtès
@ 2020-12-27 15:00 ` Ludovic Courtès
  2020-12-28  6:48   ` Dr. Arne Babenhauserheide
  2021-01-04 19:19   ` Aleix Conchillo Flaqué
  0 siblings, 2 replies; 6+ messages in thread
From: Ludovic Courtès @ 2020-12-27 15:00 UTC (permalink / raw)
  To: guile-sources, guile-user, guix-devel

[-- Attachment #1: Type: text/plain, Size: 359 bytes --]

Ludovic Courtès <ludo@gnu.org> skribis:

> I’m pleased to announce the first release of Guile-zstd:

Oops, a file was missing from the repo, so here’s a brand new release!

  git clone https://notabug.org/guile-zstd/guile-zstd
  cd guile-zstd
  git checkout v0.1.1  # or f853c8eb81088f8fbf33d38e62cddea9a4984180
  git tag -v v0.1.1

Ludo’.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guile-zstd 0.1.1 released
  2020-12-27 15:00 ` Guile-zstd 0.1.1 released Ludovic Courtès
@ 2020-12-28  6:48   ` Dr. Arne Babenhauserheide
  2020-12-28  7:33     ` Guile ports Zelphir Kaltstahl
  2021-01-04 17:21     ` Guile-zstd 0.1.1 released Ludovic Courtès
  2021-01-04 19:19   ` Aleix Conchillo Flaqué
  1 sibling, 2 replies; 6+ messages in thread
From: Dr. Arne Babenhauserheide @ 2020-12-28  6:48 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, guile-user, guile-sources

[-- Attachment #1: Type: text/plain, Size: 1651 bytes --]

Hi Ludo,

that’s pretty cool! Thank you!

Looking at the readme I get the feeling that two little helpers could be
useful:

   (call-with-zstd-output-file "compressed.zstd"
	(lambda (port)
	  (define data
	    ;; Read the input file in memory.
	    (call-with-input-file "input-file.txt"
	      get-bytevector-all))

	  ;; Write data to PORT.
	  (put-bytevector port data)))

  (call-with-zstd-input-file "compressed.zst"
	(lambda (port)
	  ;; Read decompressed data from PORT.
	  ...))

Potentially with streaming added (if that’s possible from the library):

   (call-with-zstd-output-file "compressed.zstd"
	(lambda (outport)
      (call-with-input-file "input-file.txt"
	    (lambda (inport)
          (let loop ((data (get-bytevector-some inport)))
            (when (not (eof-object? data))
              (put-bytevector outport data)
              (loop (get-bytevector-some inport))))))))

Also maybe a minimal representation of the commandline-interface:

   (zstd-compress "input-file.txt" #:output "compressed.zst")
   (zstd-decompress "compressed.zstd" #:output "cleartext-file.zst")

Best wishes,
Arne

Ludovic Courtès <ludo@gnu.org> writes:

> Ludovic Courtès <ludo@gnu.org> skribis:
>
>> I’m pleased to announce the first release of Guile-zstd:
>
> Oops, a file was missing from the repo, so here’s a brand new release!
>
>   git clone https://notabug.org/guile-zstd/guile-zstd
>   cd guile-zstd
>   git checkout v0.1.1  # or f853c8eb81088f8fbf33d38e62cddea9a4984180
>   git tag -v v0.1.1
>
> Ludo’.


-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Guile ports
  2020-12-28  6:48   ` Dr. Arne Babenhauserheide
@ 2020-12-28  7:33     ` Zelphir Kaltstahl
  2021-01-04 17:21     ` Guile-zstd 0.1.1 released Ludovic Courtès
  1 sibling, 0 replies; 6+ messages in thread
From: Zelphir Kaltstahl @ 2020-12-28  7:33 UTC (permalink / raw)
  To: guile-user

On that note, I would like to mention, how elegant I find Guile's port
system. You know, the whole "write to port to write to a file", "write
to a string port" (for example when you want to avoid building many
temporary in-between strings), "reading from ports", etc..

I've not seen something like this in other languages yet. Not sure how
much of it is Scheme standards, but I like it. It composes quite well,
at least on the surface, when you write procedures. You can always
accept an optional or keyword argument, which is the port and then leave
the choice of what that port is to the caller. It seems more elegant
than a file handle or a location of a file or something like that in
some other programming languages, where I wanted something similar.

At the beginning it was a little confusing to me, as I had not the
understanding of what a port is in Guile (and perhaps my understanding
is still superficial, but at least working), but now I enjoy it.

On 12/28/20 7:48 AM, Dr. Arne Babenhauserheide wrote:
> Hi Ludo,
>
> that’s pretty cool! Thank you!
>
> Looking at the readme I get the feeling that two little helpers could be
> useful:
>
>    (call-with-zstd-output-file "compressed.zstd"
> 	(lambda (port)
> 	  (define data
> 	    ;; Read the input file in memory.
> 	    (call-with-input-file "input-file.txt"
> 	      get-bytevector-all))
>
> 	  ;; Write data to PORT.
> 	  (put-bytevector port data)))
>
>   (call-with-zstd-input-file "compressed.zst"
> 	(lambda (port)
> 	  ;; Read decompressed data from PORT.
> 	  ...))
>
> Potentially with streaming added (if that’s possible from the library):
>
>    (call-with-zstd-output-file "compressed.zstd"
> 	(lambda (outport)
>       (call-with-input-file "input-file.txt"
> 	    (lambda (inport)
>           (let loop ((data (get-bytevector-some inport)))
>             (when (not (eof-object? data))
>               (put-bytevector outport data)
>               (loop (get-bytevector-some inport))))))))
>
> Also maybe a minimal representation of the commandline-interface:
>
>    (zstd-compress "input-file.txt" #:output "compressed.zst")
>    (zstd-decompress "compressed.zstd" #:output "cleartext-file.zst")
>
> Best wishes,
> Arne
>
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Ludovic Courtès <ludo@gnu.org> skribis:
>>
>>> I’m pleased to announce the first release of Guile-zstd:
>> Oops, a file was missing from the repo, so here’s a brand new release!
>>
>>   git clone https://notabug.org/guile-zstd/guile-zstd
>>   cd guile-zstd
>>   git checkout v0.1.1  # or f853c8eb81088f8fbf33d38e62cddea9a4984180
>>   git tag -v v0.1.1
>>
>> Ludo’.
>
-- 
repositories: https://notabug.org/ZelphirKaltstahl




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guile-zstd 0.1.1 released
  2020-12-28  6:48   ` Dr. Arne Babenhauserheide
  2020-12-28  7:33     ` Guile ports Zelphir Kaltstahl
@ 2021-01-04 17:21     ` Ludovic Courtès
  1 sibling, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2021-01-04 17:21 UTC (permalink / raw)
  To: guile-user

Hi,

"Dr. Arne Babenhauserheide" <arne_bab@web.de> skribis:

> Looking at the readme I get the feeling that two little helpers could be
> useful:
>
>    (call-with-zstd-output-file "compressed.zstd"
> 	(lambda (port)
> 	  (define data
> 	    ;; Read the input file in memory.
> 	    (call-with-input-file "input-file.txt"
> 	      get-bytevector-all))
>
> 	  ;; Write data to PORT.
> 	  (put-bytevector port data)))
>
>   (call-with-zstd-input-file "compressed.zst"
> 	(lambda (port)
> 	  ;; Read decompressed data from PORT.
> 	  ...))
>
> Potentially with streaming added (if that’s possible from the library):
>
>    (call-with-zstd-output-file "compressed.zstd"
> 	(lambda (outport)
>       (call-with-input-file "input-file.txt"
> 	    (lambda (inport)
>           (let loop ((data (get-bytevector-some inport)))
>             (when (not (eof-object? data))
>               (put-bytevector outport data)
>               (loop (get-bytevector-some inport))))))))

Yeah I kept it minimal; it’s actually the same interface as in
Guile-zlib and Guile-lzlib, which is pretty convenient.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guile-zstd 0.1.1 released
  2020-12-27 15:00 ` Guile-zstd 0.1.1 released Ludovic Courtès
  2020-12-28  6:48   ` Dr. Arne Babenhauserheide
@ 2021-01-04 19:19   ` Aleix Conchillo Flaqué
  1 sibling, 0 replies; 6+ messages in thread
From: Aleix Conchillo Flaqué @ 2021-01-04 19:19 UTC (permalink / raw)
  To: guile-user; +Cc: guix-devel, guile-sources

On Sun, Dec 27, 2020 at 7:01 AM Ludovic Courtès <ludo@gnu.org> wrote:
>
> Ludovic Courtès <ludo@gnu.org> skribis:
>
> > I’m pleased to announce the first release of Guile-zstd:
>
> Oops, a file was missing from the repo, so here’s a brand new release!
>
>   git clone https://notabug.org/guile-zstd/guile-zstd
>   cd guile-zstd
>   git checkout v0.1.1  # or f853c8eb81088f8fbf33d38e62cddea9a4984180
>   git tag -v v0.1.1
>

Great! This is now available in Guile Homebrew as well as guile-lzlib
and guile-zlib.

Btw, I sent a PR to guile-zstd:

https://notabug.org/guile-zstd/guile-zstd/pulls/1

Aleix



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-04 19:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-27 14:01 Guile-zstd 0.1.0 released Ludovic Courtès
2020-12-27 15:00 ` Guile-zstd 0.1.1 released Ludovic Courtès
2020-12-28  6:48   ` Dr. Arne Babenhauserheide
2020-12-28  7:33     ` Guile ports Zelphir Kaltstahl
2021-01-04 17:21     ` Guile-zstd 0.1.1 released Ludovic Courtès
2021-01-04 19:19   ` Aleix Conchillo Flaqué

unofficial mirror of guile-user@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guile-user/0 guile-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-user guile-user/ https://yhetil.org/guile-user \
		guile-user@gnu.org
	public-inbox-index guile-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.lisp.guile.user
	nntp://news.gmane.io/gmane.lisp.guile.user


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git