emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Imports / inclusion of s.el into Emacs


From: João Távora
Subject: Re: Imports / inclusion of s.el into Emacs
Date: Sun, 3 May 2020 15:48:56 +0100

On Sun, May 3, 2020 at 3:28 PM Philippe Vaucher
<address@hidden> 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 "singleton
>> 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 authors) ?
>>
>> 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 example
>> 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_ emacs 
> 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 many 
> languages. It's another point where I'd have thought you were trolling if 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.

-- 
João Távora



reply via email to

[Prev in Thread] Current Thread [Next in Thread]