• Re: Resources to learn common lisp?

    From Johann 'Myrkraverk' Oskarsson@3:633/10 to All on Friday, July 31, 2026 07:17:43
    On 30/07/2026 4:21 AM, steve g wrote:
    tfb <tfb@work.it.out> writes:

    Lawrence D?Oliveiro <ldo@nz.invalid> wrote:

    Have they come up with any excuses as to why OS kernels don?t use
    garbage collection?

    I think you are mistaken about OS kernels. They do garbage collection.
    Just not in the way you think about it. It's for instance how killing processes in Linux "cleans up" memory. I disagree with this design
    choice, and do not use Linux when I can avoid it.



    Here is why: they're written either in C or in languages which must be
    memory & call compatible with C. It is essentially impossible to implement >> a garbage collector in C. There is a famous counterexample: the Boehm GC. >> It would probably be possible to use that in an OS kernel written in C but >> I expect it would be very hard to retrofit it to an existing kernel. It's >> also (because C) not a copying collector.


    Introduction to GC:

    The GC package contains the Boehm-Demers-Weiser conservative garbage collector, which can be used as a garbage collecting replacement for the
    C malloc function or C++ new operator. It allows you to allocate memory basically as you normally would, without explicitly deallocating memory
    that is no longer useful. The collector automatically recycles memory
    when it determines that it can no longer be otherwise accessed. The
    collector is also used by a number of programming language
    implementations that either use C as intermediate code, want to
    facilitate easier interoperation with C libraries, or just prefer the
    simple collector interface. Alternatively, the garbage collector may be
    used as a leak detector for C or C++ programs, though that is not its
    primary goal.

    this is what guile uses and GCC can use.

    And I guess you're ignorant of the Ravenbrook /Memory Pool System/, or
    you'd have mentioned it already.

    https://github.com/Ravenbrook/mps

    I have it on stand by for a future project. I'll see if it's easier to
    use that, than to write my own. Cross posted to comp.lang.c to irritate
    the annoying regulars there.


    C was a deeply appropriate language to write an OS for the PDP-11. At
    every point since then there's been the choice of continuing to use C and
    either a port of that OS or an implementation of a compatible OS or of
    implementing a new, incompatible, OS. For at least 30 years there's really >> only been one answer to that question. And so, today, by a series of
    perfectly reasonable choices, we've ended up with a vast OS implemented in >> a language which is now deeply inappropriate.

    let me guess assembler is not your programming language of choice.
    henceforth C.

    I do a bit of assembly now and then. Which one is your favorite?


    Sadly we've also ended up with programmers who think the machines they
    program for are giant PDP-11s, and as a result machines which spend a huge >> amount of effort pretending to be giant PDP-11s.

    It's all a tragedy.

    The tragedy is not using Common Lisp for everything.

    --
    Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
    I'm not from the Internet, I just work there. | via Easynews.com

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Anton Antimo@3:633/10 to All on Friday, July 31, 2026 12:21:51
    Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes:

    [...]

    Sadly we've also ended up with programmers who think the machines
    they program for are giant PDP-11s, and as a result machines which
    spend a huge amount of effort pretending to be giant PDP-11s.

    It's all a tragedy.

    The tragedy is not using Common Lisp for everything.

    I loved this bit and I have a feeling you're correct. My little
    experience with Common Lisp is that it allows me to write the equivalent
    fast code that I'd write in C, where speed matters. In other words, I
    seem to gain nothing (other than more work) by writing typical
    applications in C.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Johann 'Myrkraverk' Oskarsson@3:633/10 to All on Saturday, August 01, 2026 01:48:56
    On 31/07/2026 11:21 PM, Anton Antimo wrote:
    Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes:

    [...]

    Sadly we've also ended up with programmers who think the machines
    they program for are giant PDP-11s, and as a result machines which
    spend a huge amount of effort pretending to be giant PDP-11s.

    It's all a tragedy.

    The tragedy is not using Common Lisp for everything.

    I loved this bit and I have a feeling you're correct. My little
    experience with Common Lisp is that it allows me to write the equivalent
    fast code that I'd write in C, where speed matters. In other words, I
    seem to gain nothing (other than more work) by writing typical
    applications in C.

    The fun is in writing atypical applications, and then finding yourself
    looking at the disassembly in SBCL.

    Personally, I love writing in C, even though it's more verbose.

    That said, and to be mildly on-topic in comp.lang.lisp, have

    * /The Common Lisp Condition System/, and

    * /Programming Algorithms in Lisp/

    been mentioned before as resources for learning common lisp?

    These two books look lovely in my programming shelf, next to

    * /Common Lisp Recipes/, and

    * /Practical Common Lisp/,

    which must have been mentioned. They're interspersed with

    * /Low Level Programming/,

    * /String Algorithms in C/, and

    * /The Joys of Hashing/,

    which come in handy when you want to implement your own Common
    Lisp system.


    Enjoy!
    --
    Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
    I'm not from the Internet, I just work there. | via Easynews.com

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Lawrence D?Oliveiro@3:633/10 to All on Friday, July 31, 2026 22:46:45
    On Fri, 31 Jul 2026 12:21:51 -0300, Anton Antimo wrote:

    Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes:

    The tragedy is not using Common Lisp for everything.

    I loved this bit and I have a feeling you're correct.

    What a dumb idea. Common Lisp is full of legacy baggage to cater to
    proprietary pre-POSIX OSes which are now extinct.

    Python can offer basic facilities like these in its standard library: <https://docs.python.org/3/library/subprocess.html> <https://docs.python.org/3/library/select.html>; where are the Common
    Lisp equivalents?

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Johann 'Myrkraverk' Oskarsson@3:633/10 to All on Saturday, August 01, 2026 07:38:32
    On 01/08/2026 6:46 AM, Lawrence D?Oliveiro wrote:
    On Fri, 31 Jul 2026 12:21:51 -0300, Anton Antimo wrote:

    Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes:

    The tragedy is not using Common Lisp for everything.

    I loved this bit and I have a feeling you're correct.

    What a dumb idea. Common Lisp is full of legacy baggage to cater to proprietary pre-POSIX OSes which are now extinct.

    As always, you start off by mouthing your own ignorance.

    * OpenVMS is both sold and ported to the x86. https://vmssoftware.com/

    * OS/2 is being sold and supported, under a new brand name.
    https://www.arcanoae.com/

    * MenuetOS is written in assembly language, so I replaced
    comp.lang.python with comp.lang.asm. https://www.menuetos.net/


    Python can offer basic facilities like these in its standard library: <https://docs.python.org/3/library/subprocess.html> <https://docs.python.org/3/library/select.html>; where are the Common
    Lisp equivalents?

    You mean this? https://www.sbcl.org/manual/#running-external-programs
    --
    Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
    I'm not from the Internet, I just work there. | via Easynews.com

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From steve g@3:633/10 to All on Friday, July 31, 2026 23:59:43
    Anton Antimo <anton@safunu.org> writes:

    Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes:

    [...]

    Sadly we've also ended up with programmers who think the machines
    they program for are giant PDP-11s, and as a result machines which
    spend a huge amount of effort pretending to be giant PDP-11s.

    It's all a tragedy.

    The tragedy is not using Common Lisp for everything.

    I loved this bit and I have a feeling you're correct. My little
    experience with Common Lisp is that it allows me to write the equivalent
    fast code that I'd write in C, where speed matters. In other words, I
    seem to gain nothing (other than more work) by writing typical
    applications in C.


    Wait until you read LISP:Lisp In Small Pieces. it's published in france.




    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Johann 'Myrkraverk' Oskarsson@3:633/10 to All on Saturday, August 01, 2026 16:12:36
    On 01/08/2026 11:59 AM, steve g wrote:
    Anton Antimo <anton@safunu.org> writes:

    Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes:

    [...]

    Sadly we've also ended up with programmers who think the machines
    they program for are giant PDP-11s, and as a result machines which
    spend a huge amount of effort pretending to be giant PDP-11s.

    It's all a tragedy.

    The tragedy is not using Common Lisp for everything.

    I loved this bit and I have a feeling you're correct. My little
    experience with Common Lisp is that it allows me to write the equivalent
    fast code that I'd write in C, where speed matters. In other words, I
    seem to gain nothing (other than more work) by writing typical
    applications in C.


    Wait until you read LISP:Lisp In Small Pieces. it's published in france.




    I read the French edition. /Principes d'Implantation de Scheme et
    Lisp/, and it's now available as ebook on Amazon. I recommend it,
    it's a really fun book. I believe it's the /second edition/, and
    may have a little bit different content than the English one, which
    I haven't read.

    Do you read French?

    --
    Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
    I'm not from the Internet, I just work there. | via Easynews.com

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From tfb@3:633/10 to All on Saturday, August 01, 2026 09:08:16
    It is 2042. A dry wind blows over a desolate landscape, raising flurries
    of dust from the burnt ground. Feral dogs, tumours proliferating on their skin, pick through the debris, raking through yellow bones in the hope of
    rats. In the distance the remains of a city, a city whose name will soon
    be remembered by nobody. Some of the buildings appear curiously melted.

    A structure made of corrugated iron, rusting, deformed panels torn from
    some vehicle, and papier mƒch‚. A turbine atop a tower made partly of
    garden furniture, creaking in the wind. A collection of car batteries.

    In the shed a thin figure crouches: ragged clothes and open sores. He
    types at a keyboard, poking a stick into the switches of the missing keys.
    The screen is cracked and dim.

    The camera's eye moves, we can see, barely, the text on the screen.

    PYTHON IS THE ONLY TRUE SOLUTION PYTHON HAS BEEN THE BEST THE ONLY
    LANGUAGE FOR CENTURIES REFERENCE COUNTING WILL NOT CORRUPT YOUR PRECIOUS BODILY FLUIDS GARBAGE COLLECTION IS THE WORK OF SATAN PYTHON IS THE
    STANDARD REFERENCE COUNTING MAKES THE BIRDS SING AND THE GRASS GREEN
    GARBAGE COLLECTORS ARE CONTINUALLY TRAWLING THROUGH DEAD DATA LISP IS OBSOLETE EVIL NOBODY USES LISP USE PYTHON LIKE ME USE PYTHON REFERENCE
    PYTHON LISP SLOW FAST PYTHON BEST YES PYTHON GARBAGE BAD PYTHON OBSOLETE

    Flecks of foam and blood land on the keyboard. No birds sing; what once
    was grass is now dust and ash.

    Still he types, faster and faster now, singing and chanting.

    From the computer in the shack a cable runs. The camera follows it, to its end: copper cores poking through charred insulation.

    Fade.

    --
    tfeb.org/computer/

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Paul@3:633/10 to All on Saturday, August 01, 2026 07:49:41
    On Sat, 8/1/2026 5:08 AM, tfb wrote:
    It is 2042.

    Fade.

    The land may be parched, but the surface is populated
    by shiny machines filled with the pretense of AI inside.

    When I asked an LLM-AI to draw me a picture of something,
    it said "here is your Python Card, execute this and your
    picture will appear". As usual, some cosmetic changes were
    required to the Card, but the code did run and meet the objective.
    I do not recollect asking for a Python Card, I asked
    for a picture. As an ordinary end-user, I was expected to know
    what Python was ("the one true language") :-) The LLM-AI
    didn't even say "Do you know what Python is ?" . It just
    said "here is your Python Card", like everyone knows what
    that is.

    You see, the LLM-AI had decided what the chosen language is,
    and it happens to be Python :-) Insert cackling laughter.

    *******

    I just asked it explicitly now, and it really IS hilarious.

    "If you are given a programming task to do, and the
    programming language is not specified, what language
    do you choose for the task and why do you choose
    that particular language ?
    "

    CoPilot Answer:

    If the task doesn?t specify a programming language, the smartest choice
    is the language that gives you the fastest, clearest, least-painful path
    to a correct solution. For most general, unspecified tasks, that tends
    to be Python - and here?s why.

    ? Short answer

    I choose Python, because it minimizes friction: fast to write, easy to read, huge standard library, and excellent for everything from quick scripts to complex algorithms.
    ...

    So there you have it, it wasn't an "accident" after all.
    It really does mean it, when it hands out Python Cards
    like they were candy. Yikes! Looks like the language
    wars are over.

    My resume in the year 2042:

    Languages: Python
    (And when I have to, English)

    *******

    Well, that was only a leg-pull. Here is another paragraph of that slop,
    to provide some balance.

    ? When I wouldn?t choose Python
    If the task hints at certain domains, I pivot:

    High?performance numeric computing ? C++ or Rust

    Systems programming / OS?level tasks ? C or Rust

    Web front?end ? JavaScript/TypeScript

    Enterprise backend ? Java or C#

    Embedded / microcontrollers ? C

    Functional programming or concurrency-heavy tasks ? Haskell, Elixir, or Rust

    But if the prompt gives no domain clues, Python is the most rational starting point.

    *******

    You Rust programmers, your job is safe for now.

    And Rust never sleeps.

    Paul

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Lawrence D?Oliveiro@3:633/10 to All on Saturday, August 01, 2026 23:37:28
    On Sat, 1 Aug 2026 07:49:41 -0400, Paul wrote:

    Well, that was only a leg-pull. Here is another paragraph of that
    slop, to provide some balance.

    Enterprise backend ? Java or C#

    This <https://www.infoworld.com/article/4091447/spring-ai-tutorial-get-started-with-spring-ai.html>
    is supposed to be an example of how you do AI programming in Java.

    Is anybody still mystified why normal people would rather use Python
    instead?

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Saturday, August 01, 2026 16:54:12
    On 8/1/2026 4:37 PM, Lawrence D?Oliveiro wrote:
    On Sat, 1 Aug 2026 07:49:41 -0400, Paul wrote:

    Well, that was only a leg-pull. Here is another paragraph of that
    slop, to provide some balance.

    Enterprise backend ? Java or C#

    This <https://www.infoworld.com/article/4091447/spring-ai-tutorial-get-started-with-spring-ai.html>
    is supposed to be an example of how you do AI programming in Java.

    Is anybody still mystified why normal people would rather use Python
    instead?

    Yeah. I see normal people that use python all the time in the store...
    Give me a break!

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)