From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Cowan Newsgroups: gmane.lisp.guile.user Subject: Re: [ANN] guile-msgpack: MessagePack for GNU Guile (+ help needed) Date: Wed, 19 Sep 2018 10:12:04 -0400 Message-ID: References: <3401551.pIYnLFp0Xl@aleksandar-ixtreme-m5740> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1537366245 27492 195.159.176.226 (19 Sep 2018 14:10:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Sep 2018 14:10:45 +0000 (UTC) Cc: guile-user@gnu.org To: hiphish@posteo.de Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Sep 19 16:10:41 2018 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g2dBg-00071e-EK for guile-user@m.gmane.org; Wed, 19 Sep 2018 16:10:40 +0200 Original-Received: from localhost ([::1]:45634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2dDm-0006qH-VF for guile-user@m.gmane.org; Wed, 19 Sep 2018 10:12:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2dDH-0006o9-01 for guile-user@gnu.org; Wed, 19 Sep 2018 10:12:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2dDF-0007G9-La for guile-user@gnu.org; Wed, 19 Sep 2018 10:12:18 -0400 Original-Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:46917) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g2dDF-0007Fd-6Q for guile-user@gnu.org; Wed, 19 Sep 2018 10:12:17 -0400 Original-Received: by mail-wr1-x434.google.com with SMTP id a108-v6so5952535wrc.13 for ; Wed, 19 Sep 2018 07:12:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccil-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aV1uzY6d8ogLoLYWw2Avk6EGdSbGBJDu/39ii6PR8s4=; b=M94sQ4Pgp3XmYbvsmuV+3eVmwSxiHpxnWpPGSeYXxnZ4PQaISbQvtEwNALFAnlai5n u3ViaylibB1XlaCoTXvLOo/4xWfx4+JsvZiV64LXUtgFGFD2sTRFOi1YnyH47q68l9F6 BxPcr6UheoMhssSmmFACqzTLxuol/4Y7hYqCr99VtZLyfrwALYrS6e0J/lnjdjAUsnGh 60TfNMK8L0M70hWNN2QwcsIYGKtU1sxiJtb15/b2JePQSACafli9aS2ex02p19zV0SAL mzTRQFicZEso6Ku94NOnN+e5pt6FzKvx7n9fCHNAGVs0izaChspcDASYRFDLtkhAACNu mQQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aV1uzY6d8ogLoLYWw2Avk6EGdSbGBJDu/39ii6PR8s4=; b=fKl8fSAmStz9p2UwuZbvt7g69+WZhAm7eE52OWYWpNOdRRdeTfWFlZG5afpt8HQWBh fSZpUnAOFF1e7bFl1j+uZwD5I6oDza0geCXLDXXEeUhdDlhgnudo1+cRZuI4zcF83Ias RYkueFa3lbK8v7sli+6GsX4RU3XPQext+Jgk8LmUpXku8UiuOKQXt8b5GMPevSldCJ75 PfXzACer2n3D0iyFe2D3tVu+kebishrp9bKXpvYzwMtze1mDvwW5H5Bt3ABnC3f2YTy3 TPbB9yje5+4WT5IpDLmUmGXV8fbjbi6GXFNMU8csQeG46UrzRGm0p8OZ3bf3FAnFWOfO CpIg== X-Gm-Message-State: APzg51B2Y7tCn3Da1xIQKHb3AlL8mtPBTF+G9lszO0JKv63IPYO9dwXK NEkL43pr7nkf2mcfvQ0IMrAXEzrmd6OXAGYSDHXrog== X-Google-Smtp-Source: ANB0VdaH1+l6wbjFvIomjP5M51CeVzPFdhclBH4qhqWGB2QzD/JKFE7xHDGXjmkMirRIr1TGSNoudkKI9ybKOrhS9n0= X-Received: by 2002:adf:c684:: with SMTP id j4-v6mr28517149wrg.243.1537366335691; Wed, 19 Sep 2018 07:12:15 -0700 (PDT) In-Reply-To: <3401551.pIYnLFp0Xl@aleksandar-ixtreme-m5740> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::434 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:14891 Archived-At: On Wed, Sep 19, 2018 at 8:33 AM HiPhish wrote: Since using MessagePack with > ports is a frequent task there is also a `pack!` procedure which takes in > a > port to pack to as well. > By convention, Scheme procedures whose only side effect is on a port don't use the ! in their names: we write `read`, `write`, `display`, not `read!`, `write!`, `display!`. I would suggest calling them pack-and-write and read-and-unpack; you can leave out the "and-" if you think those are too long. How much is portability a concern? I know Guile implements *some* or r6rs, > but > I wasn't paying much attention to that. Is it something worth considering > or > should I just treat Guile as its own language that just so happens to be > based > on Scheme? > The Scheme community is small enough that doing a little bit to make libraries more portable is worthwhile. I'd use R6RS `library` instead of Guile-specific `define-module`, and maybe put the code proper into a separate file from the module furniture. (To use `include` or any other Guile-specific procedure in an R6RS library, add `(only (guile) include)` to the imports list.) Using Guile-specific procedures is not usually a problem, as there are probably equivalents in other Schemes. > The extension type `ext` (msgpack/ext.scm) is a pair of a signed 8-bit > integer > and a bytevector. The constructor does not enforce this condition, the two > slots can be really anything. What it the proper way of enforcing this in > Guile? I know Common Lisp has type declarations and Racket has contracts, > but > what does Guile have? > Usually there's just using a constructor wrapper that checks the types before calling the real constructor (`cons` in this case). > Is there a way of making it unpack as many as it can? Returning a list of values is idiomatic. It is actually possible for a caller to receive multiple values without knowing how many it's going to get, but it's probably more trouble than it's worth in this case. > if anyone can recommend me a service for one-time donations that would > be cool. All the services I could find were about fundraising for charity > and > stuff, not what I was looking for. > GoFundMe seems like the right thing. They are large and reputable, they only take enough of your money to cover credit-card processing costs (for personal campaigns like this one), they are okay with small donations. Although they are best known for crowdfunding personal emergencies, they do handle works of art as well (software is an art, we have Knuth's word for it). -- John Cowan http://vrici.lojban.org/~cowan cowan@ccil.org First known example of political correctness: After Nurhachi had united all the other Jurchen tribes under the leadership of the Manchus, his successor Abahai (1592-1643) issued an order that the name Jurchen should be banned, and from then on, they were all to be called Manchus. --S. Robert Ramsey, The Languages of China