From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Imports / inclusion of s.el into Emacs Date: Sun, 3 May 2020 15:48:56 +0100 Message-ID: References: <87ftchy0go.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="69411"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , Stefan Monnier , Richard Stallman , Emacs developers To: Philippe Vaucher Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 03 16:49:49 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jVFwD-000HzO-Fe for ged-emacs-devel@m.gmane-mx.org; Sun, 03 May 2020 16:49:49 +0200 Original-Received: from localhost ([::1]:51210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVFwC-0001V2-Ig for ged-emacs-devel@m.gmane-mx.org; Sun, 03 May 2020 10:49:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVFvc-0000lN-K2 for emacs-devel@gnu.org; Sun, 03 May 2020 10:49:12 -0400 Original-Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]:46599) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVFvb-0005cS-LQ; Sun, 03 May 2020 10:49:12 -0400 Original-Received: by mail-io1-xd2e.google.com with SMTP id j8so5428512iog.13; Sun, 03 May 2020 07:49:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=DL1aVqTOs4j/XubJGlOWjZhk0F2j3Tty8qqOKkGmRxM=; b=TwFTQqtFINqW3/oQ17x9S70aug45garm3Lx/kj6MQnACbyJhfrtBAe0TI4HsZALMGx 69Ce8aO7EDS62URl/UmTlHH0jIg3bGdpqnLnnU6CqqFFVBGGt+s34IjmvZjiIUANRlLr Ka2qOWD26OyfNFe4wq+4qDFij7vJaBvt87Gpjcnniu7mXsVQukbaBfpYc8QcjBnw66Lp p10lI1oiaJ++fZUcFISXwh5RjqxZjclC9GVpaSOm3S0p7CcvuRQKU/yVJJfR7MiLBd3A x8gg2+c9/V7I5qSlx8k1immBG+7rCCAZ/qGzKMQLqMRGvCFD4x1VKJ+PRdIzO+c29z14 ODSw== 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=DL1aVqTOs4j/XubJGlOWjZhk0F2j3Tty8qqOKkGmRxM=; b=LrZM/GaqbAueTeSM/ZXpY5OSv10BiEGNgvaFyRq8kkS3O8BFFkJj6hy6JEpdhKTfZU /FcQRVWESVBd2Jc6u0zOLYg936Ml2TrgaZphukE2Rb8aZtyoXwaKPlhtC65sQbZW9yyK 9Ziyc5u0QWDg8PZamYu92nKrq9nSZNP4ZFiSSkjjnKg3hlMV+eKVTVCm/O+rYAvF4XFy 0UvojQ6cYLsfd9z15YpgACN8kQdlpLvgVWfmOoATefn6ycXADeQWzEXaVZdKGhnu0nQY qCirrBAPPlpTwn9h7c5p2JDqJGalaI2NWjToTDEnS0nUY8dkXxZpfOB4y3oII5skdGnZ wgUA== X-Gm-Message-State: AGi0Pubsrqze/aaVhnpvFKRTG/g+gBHNuHdXRKfWY5zyzdGP0w6MBnG7 ONHkIvwNt6pZ+dGp2VaI2VyLKYbWQN5MA7EMCmo= X-Google-Smtp-Source: APiQypJQy2pqQ8QGzVr1EsD+eyn1Q3nv9Tg1dmlx8E8mzy3z3u0CP7014NIlem685Zo9Fk3BpaiSwTkoxG0Uv3roYL8= X-Received: by 2002:a6b:6a0b:: with SMTP id x11mr11844600iog.57.1588517349806; Sun, 03 May 2020 07:49:09 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::d2e; envelope-from=joaotavora@gmail.com; helo=mail-io1-xd2e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FROM_EXCESS_BASE64=0.979, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:248694 Archived-At: On Sun, May 3, 2020 at 3:28 PM Philippe Vaucher wrote: >> Always and forever? Are strings, one-dimensional sequences of >> characters by definition, the only thing you can think about that >> involves characters whose case can be mutated? > Oh, it's designed for possible future structure in mind? > While an interesting point I think it's a bit far fetched. Don't know if it was intentional, but I see it rather as not unnecessarily under-designed. Don't burn types in the name for no good reason. And a matrix of characters doesn't sound far-fetched to me. >> It only works on strings in CL, but characters are defined to be "single= ton >> string designators", a common concept in CL. Maybe they couldn't >> quite decide on a generic version. You see CL didn't come from >> nothing, it was a giant and very expensive effort to reconcile a >> _lot_ of competing Lisps. > Interesting. Indeed you should check it out. > >> >> > >> s-truncate (len s) >> > > truncate-string-to-width (I got there with apropos truncate.*string = btw). >> > >> > Okay then let's alias that to string-truncate. >> >> To achieve what? I would only bring confusion. Also to the s.el >> cool kids, they would be equally confused, since the arguments >> are reversed. > > > Can you stop with the "cool kids" labelling? I mean we are all old farts = here :-P I just happen to have learnt both ways (readings lots of C++ books= then eating lots of Ruby tutorials) and both are useful depending on what = you do. Oh I'm exactly the same, I'm a C++ Ruby cool kid too, kinda. They shot that at me a lot when I was beginning CL. I don't think it's offensive, and laugh it off (remember it _is_ cool to be cool) I'll stop since it bothers you tho. >> > >> s-repeat (num s) >> > > (cl-loop repeat num concat s) >> > >> > What if I don't know cl (like I a significant number of package author= s) ? >> >> I think you might want to learn how to loop if you're going to program. >> You can use while, do, etc. cl-loop is just my favourite. >> I don't think this function needs to be in a library, but maybe an examp= le >> of how do this can be in one of those boring paragraphs of the manual. > The implication that I don't know how to do loops is a bit mean, but I'll= let that pass. I don't know `cl` (tho I copy-pasted some in the past), but= I do know loops. I was always somewhat taught that `cl` was not _really_ e= macs lisp so you should not use it. Maybe that's wrong. cl-lib is a utility library. I didn't mean you didn't know how to loop. But you literally suggested the possibility that one might not know how to loop in Elisp. So I stated that learning to do so is inevitable, and showed you alternative ways to loop. >> Well, I honestly had to look up the doc if "needle" was a string >> or a character. So that mental path is quite worse for me. > Again very interesting: needle and haystack is also a metaphor used in ma= ny languages. It's another point where I'd have thought you were trolling i= f you didn't understand! I know strstr() of course. But I have to `man strtr` anyway, or check the signature and spot the char*. There's no universal definition of "needle", except for the pointy thing. And strstr is haystack first needle second by the way. So let's change the libc because clojure! > It's been years since I use Emacs. I obviously never took the proper > time to learn it in full depth but I'm not a "newbie". We're all newbies, thankfully, the world is a big place, with lots of new stuff to discover. I've not learned it in "full depth" either. Actually I find this conversation engaging because it sounds like I'm speaking to myself from some years ago. I _don't_ want to sound paternalistic and it's not to make it sound like I'm more "evolved", but I would have liked a me to explain the things that confused me when I was struggling. Obviously, you're not me, so sorry if there's some cognitive dissonance. Anyway, how's that API-from-doc sweeper thing coming along? You know, the thing you started with `keep-lines`. With a few lines of code, you can make a bigger difference than all of us with a zillion lines of bikeshedding. --=20 Jo=C3=A3o T=C3=A1vora