From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Thompson, David" Newsgroups: gmane.lisp.guile.user Subject: Re: [EXT] Guile AWS Date: Mon, 12 Apr 2021 12:02:49 -0400 Message-ID: References: <87r1jfv71p.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27336"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Guile User To: Ricardo Wurmus Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Mon Apr 12 18:07:04 2021 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVz5c-0006zH-D7 for guile-user@m.gmane-mx.org; Mon, 12 Apr 2021 18:07:04 +0200 Original-Received: from localhost ([::1]:41458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVz5b-00014g-E9 for guile-user@m.gmane-mx.org; Mon, 12 Apr 2021 12:07:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVz1o-0006iA-2g for guile-user@gnu.org; Mon, 12 Apr 2021 12:03:09 -0400 Original-Received: from mail-vs1-xe2c.google.com ([2607:f8b0:4864:20::e2c]:36435) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lVz1k-0000UK-VB for guile-user@gnu.org; Mon, 12 Apr 2021 12:03:07 -0400 Original-Received: by mail-vs1-xe2c.google.com with SMTP id k124so6928177vsk.3 for ; Mon, 12 Apr 2021 09:03:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=woigC3M8LVZQ3IvbB/Zin7gr7zEWQ2S1YnwsvtcmgGw=; b=siUI2fvLbq4Efkmds4EbhQnliUuIAz+4HKJfHeC6PitEhzoDnlEp8XhUCKeaIZ60CL fOqN6zBqlR5OC5fl38o93Wht2MIGk/YzrmMeBeUa0zjibVzlF9qrzG3VQi0b6zp3dXAb CZFX5BqbY+sxFqlR3nHzUvCHMG1sgkxTsN/xYShaDmBO8ll64w8P1qLINLa1b8qHoYBo oDm/h0qw21OC14cneVeebf1dtm9OJnQ0wMUhf2qDabamxdFC8juYYZTS90eIhVX7TOzL KjfHwsqHGSh6B2aoRYaIdF2NdhoqBwDUBCOpyNnE96naaVF1P5VgMtljTPC85hyH96WB ZvDA== 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:content-transfer-encoding; bh=woigC3M8LVZQ3IvbB/Zin7gr7zEWQ2S1YnwsvtcmgGw=; b=A4JBIS8ZhX8e5+QK+ezUc54igYSkZbos6mflUmbAr3PwL0YpoQhzETgoyhv2SWfT+7 Lgb0EPqy4ygvmiNPHp/yU7D9pWHIh0xpJZ3ZxoG8Dy24FgIv3wdZHy3/c0fRzN7lv8cj nEEDzmnuIkXS3kDj/fqSN3sTBUHZwTXy2V9D57b/363UeicKFfLiOlQFgn8HPXmfTkZS wuFcRypYrRq0i3JK41CBYcMCnBXdeNaJ/lC5m69Dn/W5Gk5AfPM8QgW/47dvEXSV1UWV RsqiPDcQCM4WQL3TioQmzU3RvsE4R+ZZu6bkavjanmAjHSJbm3LOBVBektQlYd0DwRKQ cN/Q== X-Gm-Message-State: AOAM532BGtBZ1Af+Ztw4516HJvrXonFVKwyKOyjlMvPDnMFy5JcxRMSl fM9oY/F6mpLHvSfDwpfayA+7llC+E/3Xqst5KjJ/0A== X-Google-Smtp-Source: ABdhPJzSrtmUnYV/Gn2WVNPwl2ATETOS08b+koFJmOAmYi3QtDfFim2Al3w1aM9+goeZmjLdBeg3xulQiLujmvn0aKg= X-Received: by 2002:a67:fc89:: with SMTP id x9mr20424320vsp.11.1618243380045; Mon, 12 Apr 2021 09:03:00 -0700 (PDT) In-Reply-To: <87r1jfv71p.fsf@elephly.net> Received-SPF: pass client-ip=2607:f8b0:4864:20::e2c; envelope-from=dthompson2@worcester.edu; helo=mail-vs1-xe2c.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:17411 Archived-At: On Mon, Apr 12, 2021 at 11:48 AM Ricardo Wurmus wrote: > > Hi Guilers, > > this is not quite a release announcement, but the code turns out to be > usable enough that I thought I=E2=80=99d share what I=E2=80=99ve got at t= his point. > > Guile AWS is a library that lets you talk to Amazon Web Services such as > S3, the Elastic Compute Cloud (EC2), Elastic File System (EFS), Route53 > (Amazon=E2=80=99s DNS server), etc. The implementation is probably more > interesting than the library itself. > > Guile AWS is little more than a language specification for the Guile > compiler tower, which compiles the JSON specification of the AWS APIs to > Scheme. There=E2=80=99s also a bit of inelegant plumbing to actually mak= e > requests to an API endpoint. Hell yeah, this rules! Years ago I took the same approach to generate a Guile API for CloudFormation (an unreleased experiment) and was hoping that someone would do the same for the entire AWS API. As far as error handling goes, the official AWS SDK for NodeJS may be something to study. It uses asyncs (which is a syntax over simple promises) to allow for threading together multiple API requests together and handle errors without too much headache. Most of the time I use the Ruby SDK, less often the Python SDK (boto3), and in both you just have to catch exceptions or inspect responses yourself, so if that's what you have to do with the guile-aws for the time being then you're still on par with several official SDKs. Those SDKs don't do anything magical with the responses, either, so I consider being given a big ol' deserialized json/xml response in the form of a compound s-exp to be just fine. - Dave