Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.misc > #11817 > unrolled thread
| Started by | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| First post | 2026-08-24 19:38 +0800 |
| Last post | 2026-09-18 23:39 +0800 |
| Articles | 20 on this page of 38 — 9 participants |
Back to article view | Back to comp.lang.misc
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-24 19:38 +0800
Re: Resources to learn common lisp? tfb <tfb@work.it.out> - 2026-08-24 12:22 +0000
Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-24 21:04 +0800
Re: Resources to learn common lisp? tfb <tfb@work.it.out> - 2026-08-24 13:18 +0000
Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-24 22:16 +0800
Re: Resources to learn common lisp? tfb <tfb@work.it.out> - 2026-08-24 20:10 +0000
Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-25 10:34 +0800
Re: Resources to learn common lisp? Paul Rubin <no.email@nospam.invalid> - 2026-08-24 17:10 -0700
Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-25 10:41 +0800
Re: Resources to learn common lisp? tfb <tfb@work.it.out> - 2026-08-25 09:22 +0000
Re: Resources to learn common lisp? Paul Rubin <no.email@nospam.invalid> - 2026-08-25 22:13 -0700
Re: Resources to learn common lisp? Anton Antimo <anton@safunu.org> - 2026-08-26 15:43 -0300
Re: Resources to learn common lisp? Paul Rubin <no.email@nospam.invalid> - 2026-08-26 18:23 -0700
Re: Resources to learn common lisp? Anton Antimo <anton@safunu.org> - 2026-08-28 17:29 -0300
Re: Resources to learn common lisp? ram@zedat.fu-berlin.de (Stefan Ram) - 2026-08-27 10:17 +0000
Re: Resources to learn common lisp? ram@zedat.fu-berlin.de (Stefan Ram) - 2026-08-27 10:47 +0000
Re: Resources to learn common lisp? "Johann \"Myrkraverk\" Oskarsson" <johann@myrkraverk.invalid> - 2026-09-18 10:49 +0800
Re: Resources to learn common lisp? ram@zedat.fu-berlin.de (Stefan Ram) - 2026-09-18 10:25 +0000
Re: Resources to learn common lisp? "Johann \"Myrkraverk\" Oskarsson" <johann@myrkraverk.invalid> - 2026-09-18 11:05 +0800
Re: Resources to learn common lisp? red floyd <no.spam.here@its.invalid> - 2026-09-17 21:43 -0700
Re: Resources to learn common lisp? ram@zedat.fu-berlin.de (Stefan Ram) - 2026-09-18 10:28 +0000
Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-09-18 21:33 +0800
Re: Resources to learn common lisp? ram@zedat.fu-berlin.de (Stefan Ram) - 2026-09-18 13:51 +0000
Re: Resources to learn common lisp? ram@zedat.fu-berlin.de (Stefan Ram) - 2026-09-18 14:23 +0000
Re: Resources to learn common lisp? ram@zedat.fu-berlin.de (Stefan Ram) - 2026-09-18 15:18 +0000
Re: Resources to learn common lisp? "Johann \"Myrkraverk\" Oskarsson" <johann@myrkraverk.invalid> - 2026-09-19 00:07 +0800
Resources to learn Japanese (was: Resources to learn common lisp?) ram@zedat.fu-berlin.de (Stefan Ram) - 2026-09-18 16:52 +0000
Re: Resources to learn common lisp? boltar@caprica.universe - 2026-09-18 15:11 +0000
Re: Resources to learn common lisp? ram@zedat.fu-berlin.de (Stefan Ram) - 2026-09-18 15:25 +0000
Re: Resources to learn common lisp? boltar@caprica.universe - 2026-09-18 15:49 +0000
Re: Resources to learn common lisp? ram@zedat.fu-berlin.de (Stefan Ram) - 2026-09-18 16:05 +0000
Re: Resources to learn common lisp? boltar@caprica.universe - 2026-09-19 08:29 +0000
Re: Resources to learn common lisp? "Johann \"Myrkraverk\" Oskarsson" <johann@myrkraverk.invalid> - 2026-09-19 16:50 +0800
Re: Resources to learn common lisp? David Brown <david.brown@hesbynett.no> - 2026-09-18 18:18 +0200
Re: Resources to learn common lisp? "Johann \"Myrkraverk\" Oskarsson" <johann@myrkraverk.invalid> - 2026-09-19 00:35 +0800
Why no string switch? (was: Resources to learn common lisp?) ram@zedat.fu-berlin.de (Stefan Ram) - 2026-09-19 12:46 +0000
Re: Why no string switch? (was: Resources to learn common lisp?) boltar@caprica.universe - 2026-09-19 14:47 +0000
Re: Resources to learn common lisp? "Johann \"Myrkraverk\" Oskarsson" <johann@myrkraverk.invalid> - 2026-09-18 23:39 +0800
Page 1 of 2 [1] 2 Next page →
| From | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| Date | 2026-08-24 19:38 +0800 |
| Subject | Re: Resources to learn common lisp? |
| Message-ID | <m3WiS.4$UB1.1@fx15.ams4> |
On 24/08/2026 4:46 PM, tfb wrote:
> Paul Rubin <no.email@nospam.invalid> wrote:
>> tfb <tfb@work.it.out> writes:
>>> No single language has 1% of constructs anyone might ever want.
>>
>> If I can code fluently in a language, that is, I can think entirely
>> about the application-level problem I'm trying to solve and not putting
>> much effort into choosing language constructs, then it's supplying 100%
>> of what I want at least at that moment. That's great.
>>
>
> Here's the thing: you are one person. There are, shockingly, other people
> in the world who might want to write programs. You may also have noted
> that more than one programming language exists. Although you are clearly
> happy with whatever language it is you use and never inclined to look at
> anything else, perhaps some if these other languages might exist because
> other people might want a different set of constructs, don't you think?
>
Dear tfb,
I have no idea what you're talking about. To me, Paul is absolutely
correct. Being fluent in a programming language means I don't have to
look things up constantly, such as figuring out what the various &
symbols mean in Rust -- that's a recent adventure of mine, so I'm in-
cluding comp.lang.misc until we have comp.lang.rust -- and it does get
old fast.
Working in an unfamiliar programming means I'm not fluent, and I cannot
just write whatever I want -- I mean, the Rust compiler explicitly does
not allow me to just /inline "Common Lisp"/ if I may speak in C++
tokens; the equivalent Rust would probably be something like /inl Lisp {
/* Common Lisp goes here */ }/, using AWK matching syntax for emphasis
-- so I'm resorting to actually have to read the book, because constant-
ly looking things up got old several days ago.
This of course delays my chapter one project of /Writing a C Compiler/
by Nora Sandler; so I'm including comp.lang.c in this discussion as
well, for obvious reasons.
So my question to you, dear tfb, when exactly do you not know a pro-
gramming language, and when was the last time this happened to you?
--
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
[toc] | [next] | [standalone]
| From | tfb <tfb@work.it.out> |
|---|---|
| Date | 2026-08-24 12:22 +0000 |
| Message-ID | <116hd1l$2qooi$1@dont-email.me> |
| In reply to | #11817 |
Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote: > > > I have no idea what you're talking about. You really don't, no. Hint: I am not talking about whether you know the language you are using well enough, but whether the language you are using provides the constructs you need to address the problem you are solving in it succinctly. -- tfeb.org/computer/
[toc] | [prev] | [next] | [standalone]
| From | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| Date | 2026-08-24 21:04 +0800 |
| Message-ID | <LjXiS.420440$nUE4.251963@fx07.ams4> |
| In reply to | #11818 |
On 24/08/2026 8:22 PM, tfb wrote: > Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote: >> >> >> I have no idea what you're talking about. > > You really don't, no. > > Hint: I am not talking about whether you know the language you are using > well enough, but whether the language you are using provides the constructs > you need to address the problem you are solving in it succinctly. > Dear tfb, In that case, I believe you owe Paul an apology, because what you wrote was completely incongruent with what he was talking about, or at least, that's how I understand it -- and of course, I simply define myself as having better reading comprehension than you -- but then, Paul really should be able to speak up for himself, so there's no reason for us to argue about it. I simply accuse you of having poor reading comprehension, and even worse writing comprehension. Have a nice day! -- Johann | email: invalid -> com | http://www.myrkraverk.com/blog/ I'm not from the Internet, I just work there. | via Easynews.com https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
[toc] | [prev] | [next] | [standalone]
| From | tfb <tfb@work.it.out> |
|---|---|
| Date | 2026-08-24 13:18 +0000 |
| Message-ID | <116hgb5$2s4uh$1@dont-email.me> |
| In reply to | #11819 |
> > I simply accuse you of having poor reading comprehension, and even worse > writing comprehension. Do you really think that a thread about language extensibility and whether any given language could have enough co structs to satisfy all posdible users of that language had suddenly changed topic to how familiar an individual was with a given language? Really? Oh well. -- tfeb.org/computer/
[toc] | [prev] | [next] | [standalone]
| From | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| Date | 2026-08-24 22:16 +0800 |
| Message-ID | <QmYiS.339877$xpxd.116561@fx14.ams4> |
| In reply to | #11820 |
On 24/08/2026 9:18 PM, tfb wrote: > >> >> I simply accuse you of having poor reading comprehension, and even worse >> writing comprehension. > > Do you really think that a thread about language extensibility and whether > any given language could have enough co structs to satisfy all posdible > users of that language had suddenly changed topic to how familiar an > individual was with a given language? Really? Oh well. > Yes, because that's how human to human real world conversations work. Being strictly /on topic/ without any deviation is a social construct invented by psychopaths for psychopaths. It's because they can't deal with real human to human interactions, and have to /hide themselves/, and pretend. All. The. Time. You are being dangerously close to expose yourself as a psychopath, so I suggest you stop replying to me, and /touch grass/ or something. Side note, for people unfamiliar with the term psychopath in technology, please read this VICE article, and weep. https://www.vice.com/en/article/the-careers-that-attract-the-most-psychopaths-one-job-is-the-clear-winner/ I have negative respect for psychopaths, for good reasons. Have a nice life outside of Usenet! -- Johann | email: invalid -> com | http://www.myrkraverk.com/blog/ I'm not from the Internet, I just work there. | via Easynews.com https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
[toc] | [prev] | [next] | [standalone]
| From | tfb <tfb@work.it.out> |
|---|---|
| Date | 2026-08-24 20:10 +0000 |
| Message-ID | <116i8f0$365fk$1@dont-email.me> |
| In reply to | #11821 |
Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote: > > Yes, because that's how human to human real world conversations work. > Being strictly /on topic/ without any deviation is a social construct > invented by psychopaths for psychopaths. It's because they can't deal > with real human to human interactions, and have to /hide themselves/, > and pretend. > > All. The. Time. > > You are being dangerously close to expose yourself as a psychopath, so I > suggest you stop replying to me, and /touch grass/ or something. > I must admit to being pretty amused by how quickly some random internet buffoon, who very obviously is not a native English speaker, has moved from accusing me of poor English reading comprehension – and 'writing comprehension', which as a native English speaker I assume must mean 'comprehensible writing', but I dunno – to saying I'm about to expose myself as a psychopath because I 'can't deal with human to human interactions' (which is ... funny). (I half expect the same person is now wondering whether I'm using an LLM because of the spaced dashes. Hint: no.) And now, because I admit to laughing at you, it will no doubt confirm whatever pop-psychology rubbish you want to believe about people you've never met and never will. No: quite ordinary people laugh at fools, it turns put: there's a whole genre of comedy based on that. So be it. -- tfeb.org/computer/
[toc] | [prev] | [next] | [standalone]
| From | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| Date | 2026-08-25 10:34 +0800 |
| Message-ID | <cb7jS.450856$nUE4.400768@fx07.ams4> |
| In reply to | #11822 |
On 25/08/2026 4:10 AM, tfb wrote: > Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote: >> >> Yes, because that's how human to human real world conversations work. >> Being strictly /on topic/ without any deviation is a social construct >> invented by psychopaths for psychopaths. It's because they can't deal >> with real human to human interactions, and have to /hide themselves/, >> and pretend. >> >> All. The. Time. >> >> You are being dangerously close to expose yourself as a psychopath, so I >> suggest you stop replying to me, and /touch grass/ or something. >> > > I must admit to being pretty amused by how quickly some random internet > buffoon, who very obviously is not a native English speaker, has moved from > accusing me of poor English reading comprehension – and 'writing > comprehension', which as a native English speaker I assume must mean > 'comprehensible writing', but I dunno – to saying I'm about to expose > myself as a psychopath because I 'can't deal with human to human > interactions' (which is ... funny). (I half expect the same person is now > wondering whether I'm using an LLM because of the spaced dashes. Hint: > no.) And I must admit being pretty amused by people whose only claim to language skills is to be /born in a country/. You may laugh, you may cry, I don't give a shit. The thing is, people with poor reading comprehension don't know it. They always, always, accuse the other person of being /poor at communicating/, and often cannot be corrected because they don't believe they can possibly be in the wrong. Thank you for proving my point about your poor reading comprehension. And just like Lewis Carrol when he wrote Alice in Wonderland, or Through the Looking Glass -- I don't care which book had this quote -- I use my words to mean what I mean, and not what you decide it means. > > And now, because I admit to laughing at you, it will no doubt confirm > whatever pop-psychology rubbish you want to believe about people you've > never met and never will. No: quite ordinary people laugh at fools, it > turns put: there's a whole genre of comedy based on that. > > So be it. > Fools laugh at people wiser than them, that's true. Thank you for prov- ing to me you're a fool. -- Johann | email: invalid -> com | http://www.myrkraverk.com/blog/ I'm not from the Internet, I just work there. | via Easynews.com https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
[toc] | [prev] | [next] | [standalone]
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2026-08-24 17:10 -0700 |
| Message-ID | <87tsojm54k.fsf@nightsong.com> |
| In reply to | #11820 |
tfb <tfb@work.it.out> writes: > Do you really think that a thread about language extensibility and whether > any given language could have enough co structs to satisfy all posdible > users of that language had suddenly changed topic to how familiar an > individual was with a given language? Fluency does matter. If fluency in a language lets me do most of my daily tasks with at most occasional inconvenience, I'd call the language satisfactory. Stuff like macros make inconvenient things convenient. They don't make the impossible possible. And if the language makes enough everyday things convenient, it's ok with me if some inconvenient ones are left over. So I haven't felt lack of macros to be a serious shortcoming of non-Lisp languages. There are usually alternate mechanisms offered, like function decorators in Python.
[toc] | [prev] | [next] | [standalone]
| From | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| Date | 2026-08-25 10:41 +0800 |
| Message-ID | <Wh7jS.270$HM1.24@fx16.ams4> |
| In reply to | #11824 |
On 25/08/2026 8:10 AM, Paul Rubin wrote: > tfb <tfb@work.it.out> writes: >> Do you really think that a thread about language extensibility and whether >> any given language could have enough co structs to satisfy all posdible >> users of that language had suddenly changed topic to how familiar an >> individual was with a given language? > > Fluency does matter. > > If fluency in a language lets me do most of my daily tasks with at most > occasional inconvenience, I'd call the language satisfactory. Stuff > like macros make inconvenient things convenient. They don't make the > impossible possible. And if the language makes enough everyday things > convenient, it's ok with me if some inconvenient ones are left over. > > So I haven't felt lack of macros to be a serious shortcoming of non-Lisp > languages. There are usually alternate mechanisms offered, like > function decorators in Python. Thank you Paul. Now, if we're in the realm of impossible, there's very little that can be said to be truly /impossible/ in Common Lisp. This is because compilers like Steel Banks Common Lisp not only compile to pure binary code, they also offer Lisp syntax to just write the function in assembly. This is apparent to anyone who's delved into the inner guts of the compiler. Now, when we can just casually switch over to the assembly language, the /impossible/ is limited by the capabilities of the machine, and our patience to get whatever we want done. I mean, we can -- with enough patience and understanding, and reading of the code -- just overwrite the Common Lisp compiler, and the binaries it generates. I believe that's impossible in Python, so again I invite Lawrence D'Oli- veiro to correct me. And on the subject of macros, we can always template program like it's 1976, and create our own textual code generator like Yacc. Though we don't have to create one in the context of parsing. This trick works equally in Python, and Common Lisp, but is for some reasons hardly ever used in practice today. Everyone seems to be hell bent on having the programmability of the programming language itself embedded in the de- fault compiler. Why is that? -- Johann | email: invalid -> com | http://www.myrkraverk.com/blog/ I'm not from the Internet, I just work there. | via Easynews.com https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
[toc] | [prev] | [next] | [standalone]
| From | tfb <tfb@work.it.out> |
|---|---|
| Date | 2026-08-25 09:22 +0000 |
| Message-ID | <116jmt4$3jrlq$1@dont-email.me> |
| In reply to | #11824 |
oPaul Rubin <no.email@nospam.invalid> wrote: > > Fluency does matter. Absolutely so. Interestingly it's possible to not be fluent in languages (or language constructs) that you've designed: after Zyni and I wrote Štar (an iteration construct for CL), it took me months to become comfortable enough in it to use it to the exclusion of most of the standard ones. Some of this was worry about how large the support for it was (entirely silly on modern systems) and performance (we had benchmarks, but somehow these didn't help convince me), but part of it was just 'how do I get it to do that, erm ...'. > > If fluency in a language lets me do most of my daily tasks with at most > occasional inconvenience, I'd call the language satisfactory. Stuff > like macros make inconvenient things convenient. They don't make the > impossible possible. And if the language makes enough everyday things > convenient, it's ok with me if some inconvenient ones are left over. > > So I haven't felt lack of macros to be a serious shortcoming of non-Lisp > languages. There are usually alternate mechanisms offered, like > function decorators in Python. > And that's fine. There are people for whom Fortran (I mean FORTRAN, probably, because modern Fortran is a large and flexible language only really related to anything older than Fortran 90 by some backward compatibility) is a language in which they are fluent and who feel no need for any other language. There is absolutely nothing wrong with that. But if I asserted that nobody should want a language other than FORTRAN, that would probably be something quite a lot of people would take issue with. And they would be right. If I asserted that *any single* programming language should be something every person is comfortable with then I think people would take issue with that, as well. There would probably be some extremists who would say, well, if only everyone saw and understood the blinding light of (Python|Ruby|Lisp) then they would achieve true happiness. But those people are pushing what is essentially a cult. And empirically those people are just wrong: if they were right, why are there so many programming languages? Why are there both Python cultists and Ruby cultists if there is more than one true language? Do we need some kind of purge of the nonbelievers? Well, perhaps there is some finite and fairly small set of languages that would meet everyone's requirements for comfort? If that were so, why do people endlessly invent new ones? If there is a finite set, we're clearly not close to reaching it yet. I suggest that the set of languages which would mean *everyone* was comfortable is not usefully finite. If hardware architecture was unchanging and there was a fixed set of problem domains it conceivably might be, but neither of those things is true. Modern Fortran has grown all sorts of new constructs designed to deal with what modern supercomputers look like, for instance. Language exploration and modification therefore matters. It may not matter for you, or for me: we may be fluent in and comfortable with our fixed languages (they might even be the same language). But *that means nothing*: it still matters. And (this is the contentious bit): I think that, since it matters, removing barriers to it also matters. It will never be easy, but it shouldn't require designing a whole new language to explore one idea. It should be possible to write functions in an existing language which map constructs expressing that new (or borrowed) idea into the existing language. Those functions have a name: macros. You may not want to use them: that is not an argument that they are not useful to other people, and to pretend it is would be as grotesquely arrogant as if I was to say that because *I* have no use for a church it should be demolished. -- tfeb.org/computer/
[toc] | [prev] | [next] | [standalone]
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2026-08-25 22:13 -0700 |
| Message-ID | <87fr01mplp.fsf@nightsong.com> |
| In reply to | #11827 |
tfb <tfb@work.it.out> writes: > There would probably be some extremists who would say, well, if only > everyone saw and understood the blinding light of (Python|Ruby|Lisp) > then they would achieve true happiness. The Blub fallacy. Yes it applies to CL just like to anything else. > It should be possible to write functions in an existing language which > map constructs expressing that new (or borrowed) idea into the > existing language. Those functions have a name: macros. Meh, if the old language can express the new idea at all, then the new idea isn't that big of a change. Like try implementing Scheme continuations as macros in CL. There's a theoretical paper by Felleisen about what really adds expressive power to programming languages. Sadly, I don't understand it, but maybe someday. https://www2.ccs.neu.edu/racket/pubs/scp91-felleisen.pdf
[toc] | [prev] | [next] | [standalone]
| From | Anton Antimo <anton@safunu.org> |
|---|---|
| Date | 2026-08-26 15:43 -0300 |
| Message-ID | <87tsogiuxx.fsf@safunu.org> |
| In reply to | #11828 |
Paul Rubin <no.email@nospam.invalid> writes: > tfb <tfb@work.it.out> writes: >> There would probably be some extremists who would say, well, if only >> everyone saw and understood the blinding light of (Python|Ruby|Lisp) >> then they would achieve true happiness. > > The Blub fallacy. Yes it applies to CL just like to anything else. > >> It should be possible to write functions in an existing language which >> map constructs expressing that new (or borrowed) idea into the >> existing language. Those functions have a name: macros. > > Meh, if the old language can express the new idea at all, then the new > idea isn't that big of a change. Like try implementing Scheme > continuations as macros in CL. Doug Hoyte does it in Let Over Lambda. But even if we have here a case where things don't work out so well, one case won't break the efficacy of all other cases. > There's a theoretical paper by Felleisen about what really adds > expressive power to programming languages. Sadly, I don't understand > it, but maybe someday. > > https://www2.ccs.neu.edu/racket/pubs/scp91-felleisen.pdf Care to share what you don't understand about the paper? I suppose the subject is still interesting to the newsgroups addressed here, though it leans more towards comp.lang.misc and comp.theory and sci.logic.
[toc] | [prev] | [next] | [standalone]
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2026-08-26 18:23 -0700 |
| Message-ID | <877blcmk4z.fsf@nightsong.com> |
| In reply to | #11830 |
Anton Antimo <anton@safunu.org> writes: >> Like try implementing Scheme continuations as macros in CL. > Doug Hoyte does it in Let Over Lambda. I don't see how that is possible, other than by using the Turing completeness of CL macros to implement Scheme, more or less. Continuations automatically give you stackful coroutines and that requires runtime support that's not built into CL. I haven't read that book though. >> https://www2.ccs.neu.edu/racket/pubs/scp91-felleisen.pdf > Care to share what you don't understand about the paper? It's written in the academic language of PL theory, which I haven't studied enough to make sense of what the paper is saying.
[toc] | [prev] | [next] | [standalone]
| From | Anton Antimo <anton@safunu.org> |
|---|---|
| Date | 2026-08-28 17:29 -0300 |
| Message-ID | <87v78u56qh.fsf@safunu.org> |
| In reply to | #11831 |
Paul Rubin <no.email@nospam.invalid> writes: > Anton Antimo <anton@safunu.org> writes: >>> Like try implementing Scheme continuations as macros in CL. >> Doug Hoyte does it in Let Over Lambda. > > I don't see how that is possible, other than by using the Turing > completeness of CL macros to implement Scheme, more or less. > Continuations automatically give you stackful coroutines and that > requires runtime support that's not built into CL. I haven't read that > book though. I got that wrong. It turns out TFB posted in Message-ID: <116ndfj$st1q$1@dont-email.me> two days ago that Paul Graham does in ``On Lisp''.
[toc] | [prev] | [next] | [standalone]
| From | ram@zedat.fu-berlin.de (Stefan Ram) |
|---|---|
| Date | 2026-08-27 10:17 +0000 |
| Message-ID | <expressiveness-20260827111602@ram.dialup.fu-berlin.de> |
| In reply to | #11830 |
Anton Antimo <anton@safunu.org> wrote or quoted: >Care to share what you don't understand about the paper? I suppose the >subject is still interesting to the newsgroups addressed here, though it >leans more towards comp.lang.misc and comp.theory and sci.logic. According to secondary sources, Felleisen deems two programming languages to be equally expressive if programs can be rewritten into the other language, maybe using local macros (because they are just "syntactic suger"). However, to me this is too vague, because between two Turing-complete languages, programs can al- ways be rewritten into the other language. But I have not read Felleisen; I just read articles /about/ Felleisen. So maybe Fell- eisen's text is less vague. To me it feels quite naturally to take the /amount/ of code into account. If I have to write 100 lines in language B for 10 lines in language A, B seems to be less expressive to me. Bjarne Stroustrup wants to /express ideas directly in code/. Jack Reeves sees /code as design/. So the most expressive language would allow me to express my ideas directly in code, so my code would double as my design. The language would not distract with irrelevant details. Newsgroups: comp.lang.misc
[toc] | [prev] | [next] | [standalone]
| From | ram@zedat.fu-berlin.de (Stefan Ram) |
|---|---|
| Date | 2026-08-27 10:47 +0000 |
| Message-ID | <expressiveness-20260827113139@ram.dialup.fu-berlin.de> |
| In reply to | #11832 |
ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
>According to secondary sources, Felleisen deems two programming
>languages to be equally expressive if programs can be rewritten
>into the other language, maybe using local macros (because they
>are just "syntactic suger").
The following Clojure program is an example of what the
chatbot deems to be expressive (untested):
(fn [file-path]
(->>
(slurp file-path) ; Read entire file into a string
(re-seq #"\w+") ; Split text into a sequence of words
(map clojure.string/lower-case) ; Convert all words to lowercase
(filter #(>= (count %) 5)) ; Keep only words with 5+ characters
(frequencies) ; Count occurrences
(sort-by val >))) ; Sort the results by count, desc.
This is intended to solve this problem:
- read a text file,
- filter out words shorter than 5 letters,
- count the frequencies of the remaining words, and
- sort them by their counts.
If I understand Felleisen 1991 correctly from my secondary sources,
a programming language where you can write that program in the same
fashion (maybe using macros) has equal expressiveness. But when you
have to change the structure from this linear list to something more
complicated in your language, you have less expressiveness.
Here's the Python version (untested):
import re
from collections import Counter
from functools import reduce
def pipe(data, *functions):
"""Passes data sequentially through a chain of functions."""
return reduce(lambda val, func: func(val), functions, data)
def count_words(file_path: str):
return pipe(
open(file_path, 'r').read(),
lambda text: re.findall(r'\w+', text),
lambda words: (w.lower() for w in words),
lambda words: (w for w in words if len(w) >= 5),
Counter,
lambda counts: counts.most_common()
)
You could say that "pipe" is that macro that allows us to
emulate Clojure, but to Felleisen it might be a "global"
macro and, therefore, not be allowed in this context.
C++ can do such a linear sequence, but it's much more verbose,
distracting the programmer from the clean flow (untested):
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <ranges>
#include <algorithm>
#include <map>
auto count_words(const std::string& file_path) {
std::ifstream file(file_path);
std::map<std::string, int> word_counts;
std::string word;
// Helper to sanitize a word to lowercase alphanumeric characters
auto sanitize = [](std::string w) {
auto clean = w | std::views::filter([](char c) { return std::isalnum(c); })
| std::views::transform([](char c) { return std::tolower(c); });
return std::string(clean.begin(), clean.end());
};
// 1. Stream data, sanitize, and filter by length dynamically
auto word_stream = std::views::istream<std::string>(file)
| std::views::transform(sanitize)
| std::views::filter([](const std::string& w) { return w.length() >= 5; });
for (const auto& w : word_stream) { word_counts[w]++; }
// 2. Sort the map by value using C++23 range actions
std::vector<std::pair<std::string, int>> sorted(word_counts.begin(), word_counts.end());
std::ranges::sort(sorted, std::ranges::greater{}, &std::pair<std::string, int>::second);
return sorted;
}
However, we need to take into account what benefits the
verbosity brings. A lot of the verbosity of the C++ solution
might be due to namespaces like "std::", but they might
help to organize large programs.
Common Lisp can implements Clojure's "->>" as a macro (untested).
If Felleisen deems this to be a "global macro" it would not
be allowed in this context.
;; 1. Define Clojure's threading macro in pure Common Lisp
(defmacro ->> (initial-value &rest forms)
"Threads the initial-value through the forms as the last argument of each."
(reduce (lambda (acc form)
(if (listp form)
`(,(car form) ,@(cdr form) ,acc)
`(,form ,acc)))
forms
:initial-value initial-value))
;; 2. The expressive word-count function
(defun count-words (file-path)
(->> (uiop:read-file-string file-path) ; Read file to string (UIOP is standard in modern CL)
(cl-ppcre:split "[^a-zA-Z0-9]+") ; Split into words using regex
(remove-if (lambda (w) (string= w ""))) ; Filter out empty strings from split
(mapcar #'string-downcase) ; Normalize to lowercase
(remove-if (lambda (w) (< (length w) 5))) ; Keep only words with 5+ characters
(reduce (lambda (hash word) ; Count frequencies into a hash table
(incf (gethash word hash 0))
hash)
_ :initial-value (make-hash-table :test 'equal))
(alexandria:hash-table-alist) ; Convert to an association list (word . count)
(sort _ #'> :key #'cdr))) ; Sort descending by the count
[toc] | [prev] | [next] | [standalone]
| From | "Johann \"Myrkraverk\" Oskarsson" <johann@myrkraverk.invalid> |
|---|---|
| Date | 2026-09-18 10:49 +0800 |
| Message-ID | <HE1rS.267354$nBp.117827@fx02.ams4> |
| In reply to | #11833 |
On 8/27/2026 6:47 PM, Stefan Ram wrote:
Dear Stefan,
Please forgive me for this necromantic posting; I only got around to
read this today.
> // Helper to sanitize a word to lowercase alphanumeric characters
> auto sanitize = [](std::string w) {
> auto clean = w | std::views::filter([](char c) { return std::isalnum(c); })
> | std::views::transform([](char c) { return std::tolower(c); });
> return std::string(clean.begin(), clean.end());
> };
Here, it seems the variable /clean/ is completely superfluous [1].
Wouldn't it be much better if std::string() -- the constructor -- could
just use the filter directly? I mean, something like this, instead; un-
tested.
return std::string( w | filter | transform ) ;
Obviously I skipped over a lot of previous syntax, but I believe the
essence of the new lambda should be understood. This can even be used
to get rid of the {} in the lambda, allowing syntax like
auto sanitize = []( std::string w ) return std::string( w | filter |
transform ) ;
and therefore be even clearer than the original that we are dealing with
a lambda, rather than a regular function.
I have added comp.lang.c++ to this discussion.
What do you think?
[1] I'm obviously using the A.W.K. syntax for matching regular ex-
pressions here.
--
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
[toc] | [prev] | [next] | [standalone]
| From | ram@zedat.fu-berlin.de (Stefan Ram) |
|---|---|
| Date | 2026-09-18 10:25 +0000 |
| Message-ID | <filter-20260918111700@ram.dialup.fu-berlin.de> |
| In reply to | #11869 |
"Johann \"Myrkraverk\" Oskarsson" <johann@myrkraverk.invalid> wrote or quoted:
>> // Helper to sanitize a word to lowercase alphanumeric characters
>> auto sanitize = [](std::string w) {
>> auto clean = w | std::views::filter([](char c) { return std::isalnum(c); })
>> | std::views::transform([](char c) { return std::tolower(c); });
>> return std::string(clean.begin(), clean.end());
>> };
>Here, it seems the variable /clean/ is completely superfluous [1].
I'm not sure I know what code you have in mind that does not use
that variable.
>Wouldn't it be much better if std::string() -- the constructor -- could
>just use the filter directly? I mean, something like this, instead; un-
>tested.
> return std::string( w | filter | transform ) ;
Well, one /can/ write
auto sanitize = []( ::std::string w ) {
return w | std::views::filter( []( char c ){ return ::std::isalnum( c ); })
| std::views::transform( []( char c ){ return ::std::tolower( c ); })
| std::ranges::to< ::std::string >();
};
.
> auto sanitize = []( ::std::string w ) return ::std::string( w | filter |
> transform ) ;
So, I assume that you would still have to define that "filter"
does "isalnum" and that "transform" does "tolower" somewhere?
What you can do is to define,
inline constexpr auto filter = std::views::filter( []( char c ){ return ::std::isalnum( c ); });
inline constexpr auto transform = std::views::transform( []( char c ){ return ::std::tolower( c ); });
, outside of a function (before "int main()") and then use,
auto sanitize = []( ::std::string w ) {
return w | filter | transform | ::std::ranges::to< ::std::string >();
};
.
[toc] | [prev] | [next] | [standalone]
| From | "Johann \"Myrkraverk\" Oskarsson" <johann@myrkraverk.invalid> |
|---|---|
| Date | 2026-09-18 11:05 +0800 |
| Message-ID | <gU1rS.86252$Pq3.1276@fx14.ams4> |
| In reply to | #11833 |
On 8/27/2026 6:47 PM, Stefan Ram wrote:
> // Helper to sanitize a word to lowercase alphanumeric characters
> auto sanitize = [](std::string w) {
> auto clean = w | std::views::filter([](char c) { return std::isalnum(c); })
> | std::views::transform([](char c) { return std::tolower(c); });
> return std::string(clean.begin(), clean.end());
> };
Dear Stefan,
I also failed to notice at first glance that your word counting program,
while quite brilliant -- I'll probably give it a try this weekend -- is
failing to properly count "they're", "dog's" and such. I'm not sure
modern C++ has a std::isenglishword() function, so my proposal would be
something like
return std::isalnum( c ) || c == '\'' ;
but that fails if the input has Bri'ish quotes 'like this', or TeX
quotes `like this' or even ``like this.''
Has Bjarne thought to include PCRE2 in C++ already? Can we use a reg-
ular expression to match ' only if it's inside a word? Do we want to
account for Unicode single curly quotes too?
I have added comp.lang.perl to this discussion, on the off chance this
is already a solved problem with a regular expression.
I have added comp.lang.c++ for the obvious reason.
I am not aware of comp.lang.c++.boost being a real group, do you think
it should be proposed in news.groups.proposals?
Best wishes, and happy word counting in C++!
--
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
[toc] | [prev] | [next] | [standalone]
| From | red floyd <no.spam.here@its.invalid> |
|---|---|
| Date | 2026-09-17 21:43 -0700 |
| Message-ID | <118ifi1$u7nd$1@redfloyd.dont-email.me> |
| In reply to | #11870 |
On 9/17/2026 8:05 PM, Johann "Myrkraverk" Oskarsson wrote: > On 8/27/2026 6:47 PM, Stefan Ram wrote: > Has Bjarne thought to include PCRE2 in C++ already? Can we use a reg- > ular expression to match ' only if it's inside a word? Do we want to > account for Unicode single curly quotes too? > > C++ has had a regex library since C++11.
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | comp.lang.misc
csiph-web