From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.user Subject: python on guile, bytevectors Date: Tue, 23 Jul 2019 13:14:21 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="29073"; mail-complaints-to="usenet@blaine.gmane.org" To: Guile User Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Jul 23 13:14:43 2019 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hpskk-0007PI-9d for guile-user@m.gmane.org; Tue, 23 Jul 2019 13:14:42 +0200 Original-Received: from localhost ([::1]:41280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpskj-0007J2-8y for guile-user@m.gmane.org; Tue, 23 Jul 2019 07:14:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49624) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpskd-0007IG-1b for guile-user@gnu.org; Tue, 23 Jul 2019 07:14:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpskc-0005um-4e for guile-user@gnu.org; Tue, 23 Jul 2019 07:14:35 -0400 Original-Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:44368) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hpskb-0005u6-Rs for guile-user@gnu.org; Tue, 23 Jul 2019 07:14:34 -0400 Original-Received: by mail-wr1-x434.google.com with SMTP id p17so42702856wrf.11 for ; Tue, 23 Jul 2019 04:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=mgyOPbmqN6BMSYFobeBDN+LNVEtSSvknM7hefV5TE2U=; b=fDO8h5o2RgsbFBQ4XpbjiPkL7ZpLT+66HCv5P5dapR1Ef3RTl/SSwI07pKybtJFO4r AA+UoG8VFTcJsEjwuonLWYENolWuCbmelhQpg6GXCcRQLuPD2vZbgvRMP3nOy6wK6TJs t+cmqp0ernSJY+Brg55h3VnNREp9yCUjE37N4Adpf7rZ2bIoFQrThaGp9XiBh7pA+xuV 2IENVIJBNT1XFeXRUXdHrvXGLaMw1uvHGe3ZIbVuQvqDOJElZpelLH962DdwgPnfjd6Q fHSoeG7BJQE5f7OSbUFyuTV+V+WQh3L3eVXv04QlxG/RtBe8UiEXccoVk/eD7UsfjUza NFTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=mgyOPbmqN6BMSYFobeBDN+LNVEtSSvknM7hefV5TE2U=; b=P+H1HK90wwANh1owH4eR65/qGb0dKptAhTdM6WqQZBOt4ty9eJgYoB8sDkowxhl+LQ JuV4a9oPkrRc1NaBv4xcpv6gcgve+q/zIJCEcPMNUgrDu7fwaGVJaqKA1kanD2FmRRIn h2tL8t6pFh1skPvKDm+kJoAE+Y2dHq1Xb4LbxS7XeCaBWskvMyoWUtXjGO47wPo95R8q 5zRYRmtLME4au4B4mv5vMYQm9p0fmTq+Fl6RY3D7Y6XOCEAoQDUzA6OjXsmt+9PIHmHS tWQoA7a62o9xN7nYzLoLApwWfFftUeOzXxJFotPbp2JMx0FwYuDa/x+P7xY4SUFqcyXx Fzew== X-Gm-Message-State: APjAAAX5OSb1NFrCEcTRMSylp8uw/iRZ7z5FWY0e5ZLCwJWg4f/Oi1U7 rWU8UZN34I/mp0jNHtrTNR9NLqFWNXJrPyEi6m7mXw== X-Google-Smtp-Source: APXvYqzpEX+GlwKfMPdUsS8lLjbUnj3UyprVcTeC9btWmoCdDhf9JhA4wkrwPAchtZj4VHCRA4o5/zqDjcHWVCOUPzE= X-Received: by 2002:a5d:5386:: with SMTP id d6mr82451197wrv.207.1563880472120; Tue, 23 Jul 2019 04:14:32 -0700 (PDT) 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.23 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.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:15663 Archived-At: Hi, Sometimes people complain about guile string handling, that it is heavy and that it does some interpretation of the characters. The answer is that you should use bytevecors and then you hear that bytevectors containing char codes does not have all the fetaures string has. If you use python-on-guile you do have the python bytevector interface and almost all string functions are available. Furthermore I landed yesterday bytevector support for the python regexp module so that you can now intyerpret bytevectors with regexpes as well (use the ASCII flag). To note, I use a PEG parser to manage the regular expressions and it's slow. You can use the stis-paser directly and get some speedup using cuts however. This to enable a maintainable and quick implementation. Any patch that speeds the regexp engine is most welcome. Happy hacking!