Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #400622 > unrolled thread
| Started by | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| First post | 2026-07-31 07:17 +0800 |
| Last post | 2026-08-10 13:08 -0700 |
| Articles | 20 on this page of 63 — 17 participants |
Back to article view | Back to comp.lang.c
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-07-31 07:17 +0800
Re: Resources to learn common lisp? Anton Antimo <anton@safunu.org> - 2026-07-31 12:21 -0300
Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-01 01:48 +0800
Re: Resources to learn common lisp? Anton Antimo <anton@safunu.org> - 2026-08-05 13:13 -0300
Re: Resources to learn common lisp? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-05 21:48 +0000
Re: Resources to learn common lisp? David Brown <david.brown@hesbynett.no> - 2026-08-06 09:05 +0200
Manipulating C code at the AST level, in C (was: Re: Resources to learn common lisp?) Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-09 05:33 +0800
Re: Manipulating C code at the AST level, in C Paul Rubin <no.email@nospam.invalid> - 2026-08-10 01:11 -0700
Re: Manipulating C code at the AST level, in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-08-10 13:10 -0700
Re: Manipulating C code at the AST level, in C Anton Antimo <anton@safunu.org> - 2026-08-10 17:41 -0300
Re: Manipulating C code at the AST level, in C Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-10 23:53 +0000
Re: Manipulating C code at the AST level, in C scott@slp53.sl.home (Scott Lurndal) - 2026-08-11 14:29 +0000
kqueues and port_create() (was: Re: Manipulating C code at the AST level, in C) Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-12 07:51 +0800
Re: kqueues and port_create() Paul Rubin <no.email@nospam.invalid> - 2026-08-11 20:59 -0700
Re: kqueues and port_create() Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-12 13:07 +0800
Re: kqueues and port_create() Alan Bawden <alan@csail.mit.edu> - 2026-08-12 03:23 -0400
Re: kqueues and port_create() Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-12 07:50 +0000
Re: kqueues and port_create() Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-13 11:33 +0800
Re: kqueues and port_create() Paul Rubin <no.email@nospam.invalid> - 2026-08-12 02:22 -0700
Re: kqueues and port_create() Alan Bawden <alan@csail.mit.edu> - 2026-08-12 20:55 -0400
Re: kqueues and port_create() Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-13 11:37 +0800
Re: kqueues and port_create() "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-08-12 12:59 -0700
Re: Manipulating C code at the AST level, in C Nuno Silva <nunojsilva@invalid.invalid> - 2026-08-14 12:26 +0100
D.N.S. in Common Lisp (was: Re: Manipulating C code at the AST level, in C) Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-12 07:59 +0800
Re: D.N.S. in Common Lisp Anton Antimo <anton@safunu.org> - 2026-08-12 09:01 -0300
Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-12 13:18 +0800
Re: Resources to learn common lisp? bixbox <noreply@example.invalid> - 2026-08-12 10:16 +0200
Re: Resources to learn common lisp? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-13 02:18 +0000
Re: Resources to learn common lisp? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-08-13 04:56 +0200
Re: Resources to learn common lisp? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-08-12 21:13 -0700
Re: Resources to learn common lisp? Anton Antimo <anton@safunu.org> - 2026-08-13 12:25 -0300
Re: Resources to learn common lisp? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-08-13 19:01 +0200
Re: Resources to learn common lisp? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-08-13 14:50 -0700
Re: Resources to learn common lisp? Anton Antimo <anton@safunu.org> - 2026-08-14 08:27 -0300
Re: Resources to learn common lisp? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-15 03:18 +0000
Re: Resources to learn common lisp? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-14 02:47 +0000
Re: Resources to learn common lisp? cross@spitfire.i.gajendra.net (Dan Cross) - 2026-08-14 12:20 +0000
Re: Resources to learn common lisp? Anton Antimo <anton@safunu.org> - 2026-08-16 15:37 -0300
Re: Resources to learn common lisp? cross@spitfire.i.gajendra.net (Dan Cross) - 2026-08-14 12:17 +0000
Re: Resources to learn common lisp? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-08-14 16:31 +0200
Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-13 11:29 +0800
Re: Resources to learn common lisp? Michael S <already5chosen@yahoo.com> - 2026-08-14 15:30 +0300
Re: Resources to learn common lisp? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-08-14 16:45 +0200
Re: Resources to learn common lisp? David Brown <david.brown@hesbynett.no> - 2026-08-14 17:15 +0200
Re: Resources to learn common lisp? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-08-14 19:51 +0200
Re: Resources to learn common lisp? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-08-14 12:05 -0700
Re: Resources to learn common lisp? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-07-31 22:46 +0000
Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-01 07:38 +0800
Re: Resources to learn common lisp? steve g <Sgonedes1977@gmail.com> - 2026-08-04 22:26 -0400
Re: Resources to learn common lisp? tfb <tfb@work.it.out> - 2026-08-01 09:08 +0000
Re: Resources to learn common lisp? Paul <nospam@needed.invalid> - 2026-08-01 07:49 -0400
Re: Resources to learn common lisp? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-01 23:37 +0000
Re: Resources to learn common lisp? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-08-01 16:54 -0700
Re: Resources to learn common lisp? tfb <tfb@work.it.out> - 2026-08-02 07:39 +0000
Re: Resources to learn common lisp? steve g <Sgonedes1977@gmail.com> - 2026-08-04 22:39 -0400
Re: Resources to learn common lisp? steve g <Sgonedes1977@gmail.com> - 2026-07-31 23:59 -0400
Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-01 16:12 +0800
Re: Resources to learn common lisp? steve g <Sgonedes1977@gmail.com> - 2026-08-04 22:50 -0400
Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-05 19:02 +0800
Re: Resources to learn common lisp? steve g <Sgonedes1977@gmail.com> - 2026-08-06 19:36 -0400
Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-09 02:11 +0800
Re: Resources to learn common lisp? steve g <Sgonedes1977@gmail.com> - 2026-08-09 18:49 -0400
Re: Resources to learn common lisp? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-08-10 13:08 -0700
Page 2 of 4 — ← Prev page 1 [2] 3 4 Next page →
| From | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| Date | 2026-08-13 11:37 +0800 |
| Subject | Re: kqueues and port_create() |
| Message-ID | <%ZafS.188494$jNNe.172551@fx15.ams4> |
| In reply to | #401058 |
On 12/08/2026 3:23 PM, Alan Bawden wrote: > Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes: > >> On 12/08/2026 11:59 AM, Paul Rubin wrote: >>> Is this something like io_uring? Is it just for i/o on open fd's or can >>> you also use it for stuff like opening files? >> The kqueue() is for open file descriptors, created as sockets or open >> files, or anything else the FreeBSD kernel decides is a file. I'm not >> aware of any interface to create one and open a file with the same func- >> tion call. > > I _think_ what Paul was asking was is it possible to get notified when a > specific file in the file system is opened. If that's what he's asking, > then the answer is: yes kqueue/kevent can do that. You open the file in > question using O_PATH, and then create a kevent using that descriptor > with filter EVFILT_VNODE and event NOTE_OPEN. > Thank you. Are you aware of any book on this subject? One that teaches the ins and outs of how to use kqueues in FreeBSD? Something similar to /Advanced Programming in the UNIX Environment/ by Stevens? -- 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 | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Date | 2026-08-12 12:59 -0700 |
| Subject | Re: kqueues and port_create() |
| Message-ID | <115ijb9$13du2$1@dont-email.me> |
| In reply to | #401046 |
On 8/11/2026 8:59 PM, Paul Rubin wrote: > Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes: >> https://man.freebsd.org/cgi/man.cgi?kqueue > > Is this something like io_uring? Is it just for i/o on open fd's or can > you also use it for stuff like opening files? io_uring is meant for io completion. Its more low level than IOCP over on the windozer. Heck, on win, we can use it (IOCP) for files and sockets. io_uring takes special care with padding and alignment to get the mmapped memory to work with the kernel.
[toc] | [prev] | [next] | [standalone]
| From | Nuno Silva <nunojsilva@invalid.invalid> |
|---|---|
| Date | 2026-08-14 12:26 +0100 |
| Subject | Re: Manipulating C code at the AST level, in C |
| Message-ID | <115mu22$2evoe$4@dont-email.me> |
| In reply to | #400956 |
(Given I'm commenting on the content of the online manual on a Linux
system, I'm adding and followingup-to comp.os.linux.misc.)
On 2026-08-11, Lawrence D’Oliveiro wrote:
> On Mon, 10 Aug 2026 17:41:30 -0300, Anton Antimo wrote:
>
>> For select (called unix-fast-select in SBCL), see sb-unix.
>
> select(2) is considered an archaic way of doing things these days,
> because of its ABI limitations. The modern way is poll()
> <https://manpages.debian.org/poll(2)> (POSIX) or even epoll()
> <https://manpages.debian.org/epoll(7)> (Linux-specific).
The online manual here (a GNU/Linux system) says:
"poll, ppoll - wait for some event on a file descriptor"
Perhaps that should be rewritten. Reading further, it's not singular,
but that description with "*A* file descriptor" does make it sound like
poll is not a suitable replacement for select.
--
Nuno Silva
(Not subscribed to comp.lang.c)
[toc] | [prev] | [next] | [standalone]
| From | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| Date | 2026-08-12 07:59 +0800 |
| Subject | D.N.S. in Common Lisp (was: Re: Manipulating C code at the AST level, in C) |
| Message-ID | <WHOeS.6$Awy7.4@fx01.ams4> |
| In reply to | #400951 |
On 11/08/2026 4:41 AM, Anton Antimo wrote: > Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes: > >> On 06/08/2026 5:48 AM, Lawrence D’Oliveiro wrote: >>> On Wed, 05 Aug 2026 13:13:42 -0300, Anton Antimo wrote: >>> >>>> To be fair, a big part of my struggle is the thick layer of Racket >>>> on top of POSIX. For instance, try to locate the equivalent >>>> select-call on it. It's so hard to recognize exactly how your Racket >>>> maps to the lower level. I understand that may a strong point of >>>> Racket's design, but it certainly hits my weakness. >>> Sounds very Java-like. Though perhaps not as irritating as Java. >>> Compare Python <https://docs.python.org/3/library/select.html> -- >>> that’s less than 10 pages (i.e. number of times I have to hit >>> Page-Down in the browser) of docs. >> >> >> I admit I'm not sure why the select system call seems to be missing from >> this selection of networking functions, [...] > > It would be like writing C in Lisp notation. For select (called > unix-fast-select in SBCL), see sb-unix. > > (defun wait-for-stdin-select () > (sb-alien:with-alien ((read-fds (sb-alien:struct sb-unix:fd-set))) > (sb-unix:fd-zero read-fds) > (sb-unix:fd-set 0 read-fds) > (format t "Waiting up to 5 seconds for input on stdin... Type something!~%") > (force-output) > (multiple-value-bind (count err) > (sb-unix:unix-fast-select 1 (sb-alien:addr read-fds) nil nil 5 0) > (cond > ((null count) > (format t "Select failed with errno: ~A~%" err)) > ((zerop count) > (format t "Timeout! No input received.~%")) > ((sb-unix:fd-isset 0 read-fds) > (format t "Data is ready to be read from stdin!~%")) > (t > (format t "Something else woke up select!~%")))))) > > ;; run it > (wait-for-stdin-select) Thank you. This is indeed helpful. Unhelpfully, Lawrence is always talking about some sort of select in Python, and then talks about polling in Linux, when he knows we don't care about the Linux kernel here in comp.lang.lisp, because the Steel Banks Common Lisp encapsulates the kernel for us. I also admit to just using the two or three available socket libraries in QuickLisp, whenever I need to deal with raw sockets. I once imple- mented a D.N.S. server -- or service -- in Common Lisp, that replied un- helpfully with an error message to every query, as a practice in the D.N.S. protocol. I'm not sure if that source code is still public. You can trivially make your own, if you need the D.N.S. protocol in Common Lisp. That code was then adopted and the D.N.S. protocol removed, to do some- thing with raw U.D.P. datagrams. That is the beauty of sharing source code; one never knows what other people do with it. And no, I don't know why Lawrence is always pretending to be a Python influencer here in comp.lang.lisp. I hope he's getting paid for it. Happy network coding in Common Lisp! -- 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 | Anton Antimo <anton@safunu.org> |
|---|---|
| Date | 2026-08-12 09:01 -0300 |
| Subject | Re: D.N.S. in Common Lisp |
| Message-ID | <874igztumy.fsf@safunu.org> |
| In reply to | #401044 |
Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes: > On 11/08/2026 4:41 AM, Anton Antimo wrote: >> Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes: >> >>> On 06/08/2026 5:48 AM, Lawrence D’Oliveiro wrote: >>>> On Wed, 05 Aug 2026 13:13:42 -0300, Anton Antimo wrote: >>>> >>>>> To be fair, a big part of my struggle is the thick layer of Racket >>>>> on top of POSIX. For instance, try to locate the equivalent >>>>> select-call on it. It's so hard to recognize exactly how your Racket >>>>> maps to the lower level. I understand that may a strong point of >>>>> Racket's design, but it certainly hits my weakness. >>>> Sounds very Java-like. Though perhaps not as irritating as Java. >>>> Compare Python <https://docs.python.org/3/library/select.html> -- >>>> that’s less than 10 pages (i.e. number of times I have to hit >>>> Page-Down in the browser) of docs. >>> >>> >>> I admit I'm not sure why the select system call seems to be missing from >>> this selection of networking functions, [...] >> >> It would be like writing C in Lisp notation. For select (called >> unix-fast-select in SBCL), see sb-unix. >> (defun wait-for-stdin-select () >> (sb-alien:with-alien ((read-fds (sb-alien:struct sb-unix:fd-set))) >> (sb-unix:fd-zero read-fds) >> (sb-unix:fd-set 0 read-fds) >> (format t "Waiting up to 5 seconds for input on stdin... Type something!~%") >> (force-output) >> (multiple-value-bind (count err) >> (sb-unix:unix-fast-select 1 (sb-alien:addr read-fds) nil nil 5 0) >> (cond >> ((null count) >> (format t "Select failed with errno: ~A~%" err)) >> ((zerop count) >> (format t "Timeout! No input received.~%")) >> ((sb-unix:fd-isset 0 read-fds) >> (format t "Data is ready to be read from stdin!~%")) >> (t >> (format t "Something else woke up select!~%")))))) >> ;; run it >> (wait-for-stdin-select) > > Thank you. This is indeed helpful. But don't assume I'd ever write something like that in Lisp. Again, that's like C programming in Lisp notation. See IOLib, for example. > Unhelpfully, Lawrence is always talking about some sort of select in > Python, and then talks about polling in Linux, when he knows we don't > care about the Linux kernel here in comp.lang.lisp, because the Steel > Banks Common Lisp encapsulates the kernel for us. No sarcasm here. Lawrence has been doing a great service to the current USENET. We can say whatever we want about his knowledge or opinions or whatever, but he keeps a lot of people distracted here and I'm sure these people are all looking for a distraction. And his distractions are not all inadequate. He's usually bring up on-topic things that allows people here to exercise their own skills. If these contributions are too shallow---well---I'd say that's something we can say about most USENET traffic these days. Because we're very low volume these days, I think shallow contributions are better than nothing. I prefer the shallow chat than no chat at all. > And no, I don't know why Lawrence is always pretending to be a Python > influencer here in comp.lang.lisp. I hope he's getting paid for it. From what I can tell, Lawrence never really caught the Lisp culture---it can be seen in how he writes Lisp in the occasion he does it. This means his criticism aren't very serious. He loves Python, which is a way of saying---``thanks, Lisp, for the things you've done for me.''
[toc] | [prev] | [next] | [standalone]
| From | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| Date | 2026-08-12 13:18 +0800 |
| Message-ID | <RmTeS.214701$la89.42778@fx06.ams4> |
| In reply to | #400865 |
On 09/08/2026 4:52 PM, tfb wrote: > Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote: >> >> I've found the Common Lisp macro system annoying enough that I rarely >> use it. I'm OK with functions most of the time, and CLOS the rest of >> the time. And only resort to macros when I can't do anything else in >> the situation. >> > > It is so weird that people use a language whose defining feature is the > incremental construction of languages and then say they don't use that > feature. I mean, I'm aware people do that, but it's just so fucking weird. > No the subject of /weird/, I've also found it highly bizarre, if not outright disturbing, that people don't use do ... while(); in C. It's an eminently useful structured programming pattern. On the subject of Common Lisp, I find it more than disturbing when a codebase lacks the basic usage of hash tables. https://www.sbcl.org/manual/#hash-table-extensions Happy coding disturbing things! -- 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 | bixbox <noreply@example.invalid> |
|---|---|
| Date | 2026-08-12 10:16 +0200 |
| Message-ID | <115ha5n$kncd$2@dont-email.me> |
| In reply to | #401053 |
Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes: > On 09/08/2026 4:52 PM, tfb wrote: >> Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote: > No the subject of /weird/, I've also found it highly bizarre, if not > outright disturbing, that people don't use do ... while(); in C. It's > an eminently useful structured programming pattern. Finally, every time that I open a PR with that pattern I get questioned and frown. It's such disturbing. > > On the subject of Common Lisp, I find it more than disturbing when a > codebase lacks the basic usage of hash tables. > > https://www.sbcl.org/manual/#hash-table-extensions unless you find some code base that use hash table all over the place. :) bix
[toc] | [prev] | [next] | [standalone]
| From | Lawrence D’Oliveiro <ldo@nz.invalid> |
|---|---|
| Date | 2026-08-13 02:18 +0000 |
| Message-ID | <115j9h6$19ll5$2@dont-email.me> |
| In reply to | #401062 |
On Wed, 12 Aug 2026 10:16:25 +0200, bixbox wrote: >> On the subject of Common Lisp, I find it more than disturbing when >> a codebase lacks the basic usage of hash tables. >> >> https://www.sbcl.org/manual/#hash-table-extensions > > unless you find some code base that use hash table all over the place. > :) Perl was a major advance on, I would say, two counts: it popularized regular expressions, and it popularized hash tables. Putting those two features together made for an extremely useful high-level language, which is what I think finally killed BASIC.
[toc] | [prev] | [next] | [standalone]
| From | Janis Papanagnou <janis_papanagnou+ng@hotmail.com> |
|---|---|
| Date | 2026-08-13 04:56 +0200 |
| Message-ID | <115jbp0$189sr$1@dont-email.me> |
| In reply to | #401092 |
On 2026-08-13 04:18, Lawrence D’Oliveiro wrote: > On Wed, 12 Aug 2026 10:16:25 +0200, bixbox wrote: > >>> On the subject of Common Lisp, I find it more than disturbing when >>> a codebase lacks the basic usage of hash tables. >>> >>> https://www.sbcl.org/manual/#hash-table-extensions >> >> unless you find some code base that use hash table all over the place. >> :) > > Perl was a major advance on, I would say, two counts: it popularized > regular expressions, and it popularized hash tables. Regexps were popular from many Unix tools before Perl came up. And hash tables were popular from Awk, which influenced Perl as well. > Putting those two > features together made for an extremely useful high-level language, > which is what I think finally killed BASIC. I don't see how you could come to that conclusion. Some folks abandoned BASIC as early as possible, i.e. with any language that is in any respect "better" (and there were many), and I know other folks that still use a MS BASIC variant these days for scripting. - Is it dead, is it alive? - Who cares... Janis
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Date | 2026-08-12 21:13 -0700 |
| Message-ID | <115jg8e$1bdsk$1@dont-email.me> |
| In reply to | #401094 |
On 8/12/2026 7:56 PM, Janis Papanagnou wrote:
> On 2026-08-13 04:18, Lawrence D’Oliveiro wrote:
>> On Wed, 12 Aug 2026 10:16:25 +0200, bixbox wrote:
>>
>>>> On the subject of Common Lisp, I find it more than disturbing when
>>>> a codebase lacks the basic usage of hash tables.
>>>>
>>>> https://www.sbcl.org/manual/#hash-table-extensions
>>>
>>> unless you find some code base that use hash table all over the place.
>>> :)
>>
>> Perl was a major advance on, I would say, two counts: it popularized
>> regular expressions, and it popularized hash tables.
>
> Regexps were popular from many Unix tools before Perl came up.
> And hash tables were popular from Awk, which influenced Perl
> as well.
>
>> Putting those two
>> features together made for an extremely useful high-level language,
>> which is what I think finally killed BASIC.
>
> I don't see how you could come to that conclusion. Some folks
> abandoned BASIC as early as possible, i.e. with any language
> that is in any respect "better" (and there were many), and I
> know other folks that still use a MS BASIC variant these days
> for scripting. - Is it dead, is it alive? - Who cares...
Basic is fun. Care a bit. Fwiw:
From the thread Macro issue...
(kind of miss google groups wrt linking...)
Basically using C++ to help generate BASIC code:
Humm... Actually, is this use of my macro(s), CT_ASB_*, okay for this
little code example I wrote to "help" me write AppleSoft BASIC? Can you
run it, is the code Kosher, so to speak, well, does it work for you or
not...? Any undefined behavior in my macro? The macros seem a bit
hackish, but they seem to work okay for now:
______________________________________
#include <iostream>
#include <sstream>
// Macro kosher? Seems to be...
namespace ct_basic {
struct program_counter {
unsigned long m_origin;
unsigned long m_cur;
unsigned long m_inc;
std::stringstream m_prog;
program_counter(
unsigned long cur = 0,
unsigned long inc = 10
) : m_origin(cur), m_cur(cur), m_inc(inc) {
}
void line(std::stringstream const& line0) {
m_prog << m_cur << " " << line0.str() << std::endl;
m_cur += m_inc;
}
};
#define CT_ASB_LINE(mp_pc, mp_x) \
{ \
std::stringstream line0; \
line0 << mp_x; \
(mp_pc).line(line0); \
}
#define CT_ASB_GOSUB(mp_pc0, mp_pc1, mp_indent) \
CT_ASB_LINE(mp_pc0, mp_indent "GOSUB " << mp_pc1.m_origin)
}
int
main()
{
{
std::cout << "ctBasic testing 123... :^)\n";
std::cout << "__________________________\n";
{
ct_basic::program_counter pc0(100);
ct_basic::program_counter pc1(1000);
// ct_main
{
ct_basic::program_counter& PC = pc0;
CT_ASB_LINE(PC, "REM ct_main");
CT_ASB_LINE(PC, " PRINT \"ct_main\"");
CT_ASB_GOSUB(PC, pc1, " ");
CT_ASB_LINE(PC, "END");
}
// ct_init
{
ct_basic::program_counter& PC = pc1;
CT_ASB_LINE(PC, "REM ct_init");
CT_ASB_LINE(PC, " PRINT \"ct_init\"");
CT_ASB_LINE(PC, "RETURN");
}
std::cout << pc0.m_prog.str() << "\n\n";
std::cout << pc1.m_prog.str() << "\n\n";
}
std::cout << "__________________________\n";
}
std::cout << "Complete! Well, time to test the\n";
std::cout << "generated AppleSoft BASIC";
return 0;
}
______________________________________
Fwiw, I get an output of:
ctBasic testing 123... :^)
__________________________
100 REM ct_main
110 PRINT "ct_main"
120 GOSUB 1000
130 END
1000 REM ct_init
1010 PRINT "ct_init"
1020 RETURN
__________________________
Complete! Well, time to test the
generated AppleSoft BASIC
100 REM ct_vfield_applesoft_basic
110 HOME
120 HGR: HCOLOR = 3: VTAB 22
130 PRINT "ct_vfield_applesoft_basic"
140 GOSUB 1000
150 GOSUB 3000
160 SP = 0
170 RS(SP, 0) = 0
180 RS(SP, 1) = -1
190 RS(SP, 2) = 0
200 RS(SP, 3) = 1
210 RS(SP, 4) = 0
220 GOSUB 8000
230 V1(1) = 0: V1(2) = 0: V1(3) = 1: V1(4) = 128
240 GOSUB 6000
245 PRINT "Chris Thomasson's Koch Complete!"
250 END
1000 REM ct_init
1010 PRINT "ct_init"
1020 DIM A0(6)
1030 DIM V0(4)
1040 DIM V1(4)
1050 DIM V2(4)
1060 DIM V3(4)
1070 DIM V4(4)
1080 DIM V5(4)
1090 RN = 3
1100 DIM RS(RN, 16)
1110 GOSUB 2000
1120 RETURN
2000 REM ct_init_plane
2010 PRINT "ct_init_plane"
2020 A0(1) = 279: REM m_plane.m_width
2030 A0(2) = 191: REM m_plane.m_height
2040 A0(3) = 0.0126106: REM m_plane.m_xstep
2050 A0(4) = 0.0126316: REM m_plane.m_ystep
2060 A0(5) = -1.75288: REM m_plane.m_axes.m_xmin
2070 A0(6) = 1.2: REM m_plane.m_axes.m_ymax
2080 RETURN
3000 REM ct_display_plane
3010 PRINT "ct_display_plane"
3020 FOR I0 = 1 TO 6
3030 PRINT "A0("; I0; ") = " A0(I0)
3040 NEXT I0
3050 RETURN
4000 REM ct_project_point
4010 REM PRINT "ct_project_point"
4020 V0(3) = (V0(1) - A0(5)) / A0(3)
4030 V0(4) = (A0(6) - V0(2)) / A0(4)
4040 IF V0(3) < 0 THEN V0(3) = INT(V0(3) - .5)
4050 IF V0(3) >= 0 THEN V0(3) = INT(V0(3) + .5)
4060 IF V0(4) < 0 THEN V0(4) = INT(V0(4) - .5)
4070 IF V0(4) >= 0 THEN V0(4) = INT(V0(4) + .5)
4080 RETURN
5000 REM ct_plot_point
5010 REM PRINT "ct_plot_point"
5020 GOSUB 4000
5030 IF V0(3) > -1 AND V0(3) <= A0(1) AND V0(4) > -1 AND V0(4) <=
A0(2) THEN HPLOT V0(3), V0(4)
5040 RETURN
6000 REM ct_plot_circle
6010 PRINT "ct_plot_circle"
6020 AB = 6.28318 / V1(4)
6030 FOR I1 = 0 TO 6.28318 STEP AB
6040 V0(1) = V1(1) + COS(I1) * V1(3)
6050 V0(2) = V1(2) + SIN(I1) * V1(3)
6060 GOSUB 5000
6070 NEXT I1
6080 RETURN
7000 REM ct_plot_line
7010 PRINT "ct_plot_line"
7020 V0(1) = V5(1): V0(2) = V5(2)
7030 GOSUB 4000
7040 IF V0(3) < 0 THEN V0(3) = 0
7050 IF V0(3) > A0(1) THEN V0(3) = A0(1)
7060 IF V0(4) < 0 THEN V0(4) = 0
7070 IF V0(4) > A0(2) THEN V0(4) = A0(2)
7080 HPLOT V0(3), V0(4)
7090 V0(1) = V5(3): V0(2) = V5(4)
7100 GOSUB 4000
7110 IF V0(3) < 0 THEN V0(3) = 0
7120 IF V0(3) > A0(1) THEN V0(3) = A0(1)
7130 IF V0(4) < 0 THEN V0(4) = 0
7140 IF V0(4) > A0(2) THEN V0(4) = A0(2)
7150 HPLOT TO V0(3), V0(4)
7160 RETURN
8000 REM ct_koch
8010 IF RS(SP, 0) >= RN THEN RETURN
8020 PRINT "ct_koch = "; RS(SP, 0); " "; RS(SP, 1); " "; RS(SP, 2);
" "; RS(SP, 3); " "; RS(SP, 4)"
8030 RS(SP, 5) = RS(SP, 3) - RS(SP, 1) : REM difx
8040 RS(SP, 6) = RS(SP, 4) - RS(SP, 2) : REM dify
8050 RS(SP, 7) = RS(SP, 1) + RS(SP, 5) / 2 : REM dify
8060 RS(SP, 8) = RS(SP, 2) + RS(SP, 6) / 2 : REM dify
8070 RS(SP, 9) = -RS(SP, 6) : REM perpx
8080 RS(SP, 10) = RS(SP, 5) : REM perpy
8090 RS(SP, 11) = RS(SP, 7) + RS(SP, 9) / 3 : REM tipx
8100 RS(SP, 12) = RS(SP, 8) + RS(SP, 10) / 3 : REM tipy
8110 RS(SP, 13) = RS(SP, 1) + RS(SP, 5) / 3 : REM k0x
8120 RS(SP, 14) = RS(SP, 2) + RS(SP, 6) / 3 : REM k0y
8130 RS(SP, 15) = RS(SP, 3) - RS(SP, 5) / 3 : REM k1x
8140 RS(SP, 16) = RS(SP, 4) - RS(SP, 6) / 3 : REM k1y
8145 IF RS(SP, 0) < RN - 1 GOTO 8230
8150 V5(1) = RS(SP, 1): V5(2) = RS(SP, 2): V5(3) = RS(SP, 13): V5(4)
= RS(SP, 14)
8160 GOSUB 7000
8170 V5(1) = RS(SP, 13): V5(2) = RS(SP, 14): V5(3) = RS(SP, 11):
V5(4) = RS(SP, 12)
8180 GOSUB 7000
8190 V5(1) = RS(SP, 11): V5(2) = RS(SP, 12): V5(3) = RS(SP, 15):
V5(4) = RS(SP, 16)
8200 GOSUB 7000
8210 V5(1) = RS(SP, 15): V5(2) = RS(SP, 16): V5(3) = RS(SP, 3):
V5(4) = RS(SP, 4)
8220 GOSUB 7000
8230 REM line 0
8240 SP = SP + 1
8250 RS(SP, 0) = RS(SP - 1, 0) + 1
8260 RS(SP, 1) = RS(SP - 1, 1)
8270 RS(SP, 2) = RS(SP - 1, 2)
8280 RS(SP, 3) = RS(SP - 1, 13)
8290 RS(SP, 4) = RS(SP - 1, 14)
8300 GOSUB 8000
8310 SP = SP - 1
8320 REM line 1
8330 SP = SP + 1
8340 RS(SP, 0) = RS(SP - 1, 0) + 1
8350 RS(SP, 1) = RS(SP - 1, 13)
8360 RS(SP, 2) = RS(SP - 1, 14)
8370 RS(SP, 3) = RS(SP - 1, 11)
8380 RS(SP, 4) = RS(SP - 1, 12)
8390 GOSUB 8000
8400 SP = SP - 1
8410 REM line 2
8420 SP = SP + 1
8430 RS(SP, 0) = RS(SP - 1, 0) + 1
8440 RS(SP, 1) = RS(SP - 1, 11)
8450 RS(SP, 2) = RS(SP - 1, 12)
8460 RS(SP, 3) = RS(SP - 1, 15)
8470 RS(SP, 4) = RS(SP - 1, 16)
8480 GOSUB 8000
8490 SP = SP - 1
8500 REM line 3
8510 SP = SP + 1
8520 RS(SP, 0) = RS(SP - 1, 0) + 1
8530 RS(SP, 1) = RS(SP - 1, 15)
8540 RS(SP, 2) = RS(SP - 1, 16)
8550 RS(SP, 3) = RS(SP - 1, 3)
8560 RS(SP, 4) = RS(SP - 1, 4)
8570 GOSUB 8000
8580 SP = SP - 1
8590 RETURN
[toc] | [prev] | [next] | [standalone]
| From | Anton Antimo <anton@safunu.org> |
|---|---|
| Date | 2026-08-13 12:25 -0300 |
| Message-ID | <8733wijb3w.fsf@safunu.org> |
| In reply to | #401094 |
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes: > On 2026-08-13 04:18, Lawrence D’Oliveiro wrote: >> On Wed, 12 Aug 2026 10:16:25 +0200, bixbox wrote: >> >>>> On the subject of Common Lisp, I find it more than disturbing when >>>> a codebase lacks the basic usage of hash tables. >>>> >>>> https://www.sbcl.org/manual/#hash-table-extensions >>> >>> unless you find some code base that use hash table all over the place. >>> :) >> Perl was a major advance on, I would say, two counts: it popularized >> regular expressions, and it popularized hash tables. > > Regexps were popular from many Unix tools before Perl came up. It was Ken Thompson who first put them in such practical use. And I would guess it was in ed. And from ed, grep sprung as an executable. > And hash tables were popular from Awk, which influenced Perl as well. And the reason I don't use Perl myself: if the program gets larger, I choose Common Lisp. The rich syntax of Perl has never been too kind on me, but I always wrote Perl happy (unlike Java, which always had the same fate of Basic [to me]).
[toc] | [prev] | [next] | [standalone]
| From | Janis Papanagnou <janis_papanagnou+ng@hotmail.com> |
|---|---|
| Date | 2026-08-13 19:01 +0200 |
| Message-ID | <115kt92$183lr$1@dont-email.me> |
| In reply to | #401115 |
On 2026-08-13 17:25, Anton Antimo wrote: > Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes: > >> On 2026-08-13 04:18, Lawrence D’Oliveiro wrote: >>> On Wed, 12 Aug 2026 10:16:25 +0200, bixbox wrote: >>> >>>>> On the subject of Common Lisp, I find it more than disturbing when >>>>> a codebase lacks the basic usage of hash tables. >>>>> >>>>> https://www.sbcl.org/manual/#hash-table-extensions >>>> >>>> unless you find some code base that use hash table all over the place. >>>> :) >>> Perl was a major advance on, I would say, two counts: it popularized >>> regular expressions, and it popularized hash tables. >> >> Regexps were popular from many Unix tools before Perl came up. > > It was Ken Thompson who first put them in such practical use. And I > would guess it was in ed. And from ed, grep sprung as an executable. Yes, and add all the grep variants, then sed, awk, pager programs, ex/vi, expr, and more (tcl, m4, lex may be amongst them but I'm not sure they had regexps from the beginning). And there was a C-library available, so one could easily add regexp functions to own tools! > >> And hash tables were popular from Awk, which influenced Perl as well. > > And the reason I don't use Perl myself: if the program gets larger, I > choose Common Lisp. The rich syntax of Perl has never been too kind on > me, but I always wrote Perl happy (unlike Java, which always had the > same fate of Basic [to me]). Oh, I've never seen Java and Basic mentioned in one sentence before. At least we have got some nice abbreviated forms for regex elements from Perl; mostly syntactic sugar, maybe, but very useful, IMO. Good that they spread also into other regexp supporting tools so that you don't have to buy Perl just for the accommodating regexp formulations. Janis
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Date | 2026-08-13 14:50 -0700 |
| Message-ID | <115le7g$2196o$1@dont-email.me> |
| In reply to | #401122 |
On 8/13/2026 10:01 AM, Janis Papanagnou wrote: > On 2026-08-13 17:25, Anton Antimo wrote: >> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes: >> >>> On 2026-08-13 04:18, Lawrence D’Oliveiro wrote: >>>> On Wed, 12 Aug 2026 10:16:25 +0200, bixbox wrote: >>>> >>>>>> On the subject of Common Lisp, I find it more than disturbing when >>>>>> a codebase lacks the basic usage of hash tables. >>>>>> >>>>>> https://www.sbcl.org/manual/#hash-table-extensions >>>>> >>>>> unless you find some code base that use hash table all over the place. >>>>> :) >>>> Perl was a major advance on, I would say, two counts: it popularized >>>> regular expressions, and it popularized hash tables. >>> >>> Regexps were popular from many Unix tools before Perl came up. >> >> It was Ken Thompson who first put them in such practical use. And I >> would guess it was in ed. And from ed, grep sprung as an executable. > > Yes, and add all the grep variants, then sed, awk, pager programs, > ex/vi, expr, and more (tcl, m4, lex may be amongst them but I'm not > sure they had regexps from the beginning). > > And there was a C-library available, so one could easily add regexp > functions to own tools! > >> >>> And hash tables were popular from Awk, which influenced Perl as well. >> >> And the reason I don't use Perl myself: if the program gets larger, I >> choose Common Lisp. The rich syntax of Perl has never been too kind on >> me, but I always wrote Perl happy (unlike Java, which always had the >> same fate of Basic [to me]). > > Oh, I've never seen Java and Basic mentioned in one sentence before. Run the program I posted in this thread on this online applesoft basic emulator written i Java: https://www.calormen.com/jsbasic/ ;^) > > At least we have got some nice abbreviated forms for regex elements > from Perl; mostly syntactic sugar, maybe, but very useful, IMO. Good > that they spread also into other regexp supporting tools so that you > don't have to buy Perl just for the accommodating regexp formulations. > > Janis >
[toc] | [prev] | [next] | [standalone]
| From | Anton Antimo <anton@safunu.org> |
|---|---|
| Date | 2026-08-14 08:27 -0300 |
| Message-ID | <87bjb5c573.fsf@safunu.org> |
| In reply to | #401122 |
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes: > On 2026-08-13 17:25, Anton Antimo wrote: >> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes: >> >>> On 2026-08-13 04:18, Lawrence D’Oliveiro wrote: >>>> On Wed, 12 Aug 2026 10:16:25 +0200, bixbox wrote: >>>> >>>>>> On the subject of Common Lisp, I find it more than disturbing when >>>>>> a codebase lacks the basic usage of hash tables. >>>>>> >>>>>> https://www.sbcl.org/manual/#hash-table-extensions >>>>> >>>>> unless you find some code base that use hash table all over the place. >>>>> :) >>>> Perl was a major advance on, I would say, two counts: it popularized >>>> regular expressions, and it popularized hash tables. >>> >>> Regexps were popular from many Unix tools before Perl came up. >> It was Ken Thompson who first put them in such practical use. And I >> would guess it was in ed. And from ed, grep sprung as an executable. > > Yes, and add all the grep variants, then sed, awk, pager programs, > ex/vi, expr, and more (tcl, m4, lex may be amongst them but I'm not > sure they had regexps from the beginning). > > And there was a C-library available, so one could easily add regexp > functions to own tools! >> >>> And hash tables were popular from Awk, which influenced Perl as well. >> And the reason I don't use Perl myself: if the program gets larger, >> I >> choose Common Lisp. The rich syntax of Perl has never been too kind on >> me, but I always wrote Perl happy (unlike Java, which always had the >> same fate of Basic [to me]). > > Oh, I've never seen Java and Basic mentioned in one sentence before. Lol. Don't take it seriously. I've never really used Basic and while I tried dove into Java with a lot of enthusiasm (as I did with C++ after feeling I was very good with C), I really couldn't continue---too much bureaucracy, I felt. > At least we have got some nice abbreviated forms for regex elements > from Perl; mostly syntactic sugar, maybe, but very useful, IMO. Good > that they spread also into other regexp supporting tools so that you > don't have to buy Perl just for the accommodating regexp formulations. In ``Let Over Lambda'', Doug Hoyte guides you into implementing this side of Perl in Common Lisp. In the prerequisites, he shows very neat ideas in macro writing.
[toc] | [prev] | [next] | [standalone]
| From | Lawrence D’Oliveiro <ldo@nz.invalid> |
|---|---|
| Date | 2026-08-15 03:18 +0000 |
| Message-ID | <115olp9$31q4n$2@dont-email.me> |
| In reply to | #401156 |
On Fri, 14 Aug 2026 08:27:44 -0300, Anton Antimo wrote: > I've never really used Basic and while I tried dove into Java with a > lot of enthusiasm (as I did with C++ after feeling I was very good > with C), I really couldn't continue---too much bureaucracy, I felt. “Bureaucracy” is absolutely a good word to sum up Java.
[toc] | [prev] | [next] | [standalone]
| From | Lawrence D’Oliveiro <ldo@nz.invalid> |
|---|---|
| Date | 2026-08-14 02:47 +0000 |
| Message-ID | <115lvj3$2639l$3@dont-email.me> |
| In reply to | #401115 |
On Thu, 13 Aug 2026 12:25:55 -0300, Anton Antimo wrote: > Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes: > >> On 2026-08-13 04:18, Lawrence D’Oliveiro wrote: >> >>> Perl was a major advance on, I would say, two counts: it >>> popularized regular expressions, and it popularized hash tables. >> >> Regexps were popular from many Unix tools before Perl came up. > > It was Ken Thompson who first put them in such practical use. And I > would guess it was in ed. And from ed, grep sprung as an executable. > >> And hash tables were popular from Awk, which influenced Perl as >> well. Notice what’s missing: putting the two together into a common, much more powerful tool. Awk was a precursor of this: but Perl does everything Awk can do, just as concisely, and a lot more besides. > The rich syntax of Perl has never been too kind on me, but I always > wrote Perl happy (unlike Java, which always had the same fate of > Basic [to me]). I did use Perl a lot for a while. But I always got the feeling that there were things going on I never quite fully understood. Looking at frequent examples of “obfuscated Perl” just confirmed that impression. Then I discovered Python. Maybe not quite as concise (i.e. cryptic) as Perl in some ways, but actually just as powerful, and in a more digestible form. It is not a coincidence that the Python community attracts the best minds to keep building on it nowadays. > And the reason I don't use Perl myself: if the program gets larger, > I choose Common Lisp. People say “Common Lisp”, but no vanilla implementation of that would be worth using nowadays.
[toc] | [prev] | [next] | [standalone]
| From | cross@spitfire.i.gajendra.net (Dan Cross) |
|---|---|
| Date | 2026-08-14 12:20 +0000 |
| Message-ID | <115n171$s92$1@reader1.panix.com> |
| In reply to | #401115 |
In article <8733wijb3w.fsf@safunu.org>, Anton Antimo <anton@safunu.org> wrote: >Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes: > >> On 2026-08-13 04:18, Lawrence D’Oliveiro wrote: >>> On Wed, 12 Aug 2026 10:16:25 +0200, bixbox wrote: >>> >>>>> On the subject of Common Lisp, I find it more than disturbing when >>>>> a codebase lacks the basic usage of hash tables. >>>>> >>>>> https://www.sbcl.org/manual/#hash-table-extensions >>>> >>>> unless you find some code base that use hash table all over the place. >>>> :) >>> Perl was a major advance on, I would say, two counts: it popularized >>> regular expressions, and it popularized hash tables. >> >> Regexps were popular from many Unix tools before Perl came up. > >It was Ken Thompson who first put them in such practical use. And I >would guess it was in ed. And from ed, grep sprung as an executable. Ken certainly popularized their use, though not in ed: it was in QED, which predated ed by some number of years, and was used on CTSS. Thompson's CACM paper on NFA simulation predated Unix (and thus ed) by a year or so: https://dl.acm.org/doi/10.1145/363347.363387 - Dan C. (I think I said he targeted the 7090 in another post; it was the 7094, which was an upgraded 7090) >> And hash tables were popular from Awk, which influenced Perl as well. > >And the reason I don't use Perl myself: if the program gets larger, I >choose Common Lisp. The rich syntax of Perl has never been too kind on >me, but I always wrote Perl happy (unlike Java, which always had the >same fate of Basic [to me]).
[toc] | [prev] | [next] | [standalone]
| From | Anton Antimo <anton@safunu.org> |
|---|---|
| Date | 2026-08-16 15:37 -0300 |
| Message-ID | <87bjb13o9a.fsf@safunu.org> |
| In reply to | #401158 |
cross@spitfire.i.gajendra.net (Dan Cross) writes: > In article <8733wijb3w.fsf@safunu.org>, Anton Antimo <anton@safunu.org> wrote: >>Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes: >> >>> On 2026-08-13 04:18, Lawrence D’Oliveiro wrote: >>>> On Wed, 12 Aug 2026 10:16:25 +0200, bixbox wrote: >>>> >>>>>> On the subject of Common Lisp, I find it more than disturbing when >>>>>> a codebase lacks the basic usage of hash tables. >>>>>> >>>>>> https://www.sbcl.org/manual/#hash-table-extensions >>>>> >>>>> unless you find some code base that use hash table all over the place. >>>>> :) >>>> Perl was a major advance on, I would say, two counts: it popularized >>>> regular expressions, and it popularized hash tables. >>> >>> Regexps were popular from many Unix tools before Perl came up. >> >>It was Ken Thompson who first put them in such practical use. And I >>would guess it was in ed. And from ed, grep sprung as an executable. > > Ken certainly popularized their use, though not in ed: it was in > QED, which predated ed by some number of years, and was used on > CTSS. Thompson's CACM paper on NFA simulation predated Unix > (and thus ed) by a year or so: > https://dl.acm.org/doi/10.1145/363347.363387 > > - Dan C. [...] Thank you so much for the reference.
[toc] | [prev] | [next] | [standalone]
| From | cross@spitfire.i.gajendra.net (Dan Cross) |
|---|---|
| Date | 2026-08-14 12:17 +0000 |
| Message-ID | <115n10p$n9j$1@reader1.panix.com> |
| In reply to | #401094 |
In article <115jbp0$189sr$1@dont-email.me>, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote: >On 2026-08-13 04:18, Lawrence D’Oliveiro wrote: >> On Wed, 12 Aug 2026 10:16:25 +0200, bixbox wrote: >> >>>> On the subject of Common Lisp, I find it more than disturbing when >>>> a codebase lacks the basic usage of hash tables. >>>> >>>> https://www.sbcl.org/manual/#hash-table-extensions >>> >>> unless you find some code base that use hash table all over the place. >>> :) >> >> Perl was a major advance on, I would say, two counts: it popularized >> regular expressions, and it popularized hash tables. > >Regexps were popular from many Unix tools before Perl came up. >And hash tables were popular from Awk, which influenced Perl >as well. Hash tables for fast lookups had been known for decades before awk was written, and regular expressions applied to text processing predate Unix by some years. Thompson's paper described a technique (what has come to be known as "Thompson's Construction") used on the IBM 7090 computer, predating Multics. To bring this back to C, the expression of Thompson's construction in C is rather straight-forward and elegant, and an early example in K&R and K&R2 is implementing a hash table, with closed addressing and chaining for collision resolution. (Comparing the algorithms used between the two editions is constructive). - Dan C.
[toc] | [prev] | [next] | [standalone]
| From | Janis Papanagnou <janis_papanagnou+ng@hotmail.com> |
|---|---|
| Date | 2026-08-14 16:31 +0200 |
| Message-ID | <115n8sv$183lr$3@dont-email.me> |
| In reply to | #401157 |
On 2026-08-14 14:17, Dan Cross wrote: > In article <115jbp0$189sr$1@dont-email.me>, > Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote: >> On 2026-08-13 04:18, Lawrence D’Oliveiro wrote: >>> >>> Perl was a major advance on, I would say, two counts: it popularized >>> regular expressions, and it popularized hash tables. >> >> Regexps were popular from many Unix tools before Perl came up. >> And hash tables were popular from Awk, which influenced Perl >> as well. > > Hash tables for fast lookups had been known for decades before > awk was written, and regular expressions applied to text > processing predate Unix by some years. Thompson's paper > described a technique (what has come to be known as "Thompson's > Construction") used on the IBM 7090 computer, predating Multics. Yes, sure. (And I didn't claim that Unixes were where they first appeared.) But above we spoke about their popularization.[*] Would you also say that these appearances made Regexps "popular"? With the dissemination of the Unixes they certainly became widely popular; this is at least my observation. Concerning hash tables, I haven't the whole historic picture here (i.e. where they were implemented, their grade of dissemination and popularity) beyond that they're comparably old as concept; my point was just that Perl was not the "popularizing factor". In (standard-)Awk they are actually the only non-primitive data type available (as opposed to Perl or early Shells, the latter even with only severely restricted arrays). Janis [*] I'm not sure you meant your post as addendum or corrigendum. >[...]
[toc] | [prev] | [next] | [standalone]
Page 2 of 4 — ← Prev page 1 [2] 3 4 Next page →
Back to top | Article view | comp.lang.c
csiph-web