• Re: put elisp numerical output into buffer

    From Gene@gene.sullivan@gmail.com to gnu.emacs.help on Sun Mar 27 17:48:59 2022
    From Newsgroup: gnu.emacs.help

    On Saturday, May 23, 2020 at 12:21:10 PM UTC-4, Richard Smith wrote:
    Hello all

    Only posted once before, many years ago, so please be gentle with me!

    How do you make a computer program output to a text buffer of your
    chosing? So that at the end of the program run you can save (C-x
    C-f).

    I use "C-u C-x C-e" frequently.

    But haven't found how to pick up a big output direct out like the
    example appended into a buffer.

    I've never studied this, and pick up "messages" in the "Message"
    buffer and copy and paste. Proper method would be good.

    I suspect this is a very common question. Could you point me in the
    right direction?

    By the way - I use emacs lisp for general programming because emacs is already there on the computer and it does absolutely fine for all my programming needs.
    It objects to a lot of recursion, which could run to several million recursions for a fine accurate solution (though is tail-recursive),
    but a looping expression is easily done and can do millions of loops readily.

    Also advantage emacs is the opportunity to inject the answer straight
    into the buffer / file with your notes.

    Regards,
    Rich Smith

    Given that most end-user `office' apps allow one to both import and export CSV and/or TSV files, you might want to consider using commas or tabs as delimiters when you output your computed data.
    Data in this format can be used within emacs as well as gobs of desktop apps, smartphone apps, etc.

    It's super smart to use a neutral format which allows you to work back and forth between an assortment of apps.

    Gene

    P.S. both simple emacs spreadsheet AND Org tables will allow you to format things in a more-readable way ... so you might want to experiment with either or both of them.

    G

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Richard Smith@null@void.com to gnu.emacs.help on Tue May 24 08:50:08 2022
    From Newsgroup: gnu.emacs.help

    Hiya Steve, Gene

    Thanks for ideas.
    Sorry - I got what I needed to do done and moved on without being
    grateful looking at further responses.

    Since then, I've ended up with a suite of functions for doing beam calculations. As is classic with lisp - it started at the bottom
    doing the frequent repetitious lowest-level calculations and grew
    upwards into all-in-one functions for specific cases. eg. a
    simply-supported I-beam.

    Bottom-up programming.
    Creating your own language for expressing a class of problems /
    challenges

    Totally to be commended.
    About computing as I do it.
    I'm a welder, basic engineer and metallurgist, so when everythign is
    running right with computing I don't otherwise think of it. I've been
    working long hours welding in the last couple of years.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Gene@gene.sullivan@gmail.com to gnu.emacs.help on Tue May 24 22:09:44 2022
    From Newsgroup: gnu.emacs.help

    On Tuesday, May 24, 2022 at 3:50:11 AM UTC-4, Richard Smith wrote:
    Hiya Steve, Gene
    Totally to be commended.
    About computing as I do it.
    I'm a welder, basic engineer and metallurgist, so when everythign is
    running right with computing I don't otherwise think of it. I've been working long hours welding in the last couple of years.
    It seems that we have a few common features of our personal past.
    Though I learned how to weld along the way, I've never done it professionally. And to the extent that's I'd want to weld anything as if `permanent', I'd want an CNC angle grinder to UN-weld it.
    Since my last welding course I've assembled things NOT out of metal via various ways BECAUSE value disassembly as much as assembly.
    As for `applied science' I obtained an AAS in mech tech which required me to so beam calculations and introduced me to metallurgy.
    But those degree requirements were posed and met BEFORE CAD software became available for PCs, and the `word processor' was yet to become available and mainstream.
    BECAUSE there WERE Computer-Aided Design tools -- called programming languages -- all the tech programs at my college had a `computer apps' course in which one Designed and used their OWN apps, though regrettably in BASIC rather than in a functional language such as APL, Lisp, or scheme ... or even Forth as a thinly veiled programmable version of a stack-based reverse-polish notions calculators marketed by HP and coveted by engineers the world over.
    Little did we know it, we were doing IA -- Intelligence Augmentation.
    And when ready-made CAD apps and the word processor became available, MOST of my class mates had moved on to become professionals who were de-skilled as IA neophytes do to `the boss' requiring them to use off-the-shelf code -- proprietary stuff with the hood welded shut so thoroughly closed to empirical inquiry that as people obsessed with knowing how-to and how-things-work `under the hood' -- collect their pay checks, and get on with things.
    That was in the early 80's
    By the mid 80's the CAD manufactures selected `scheme' as the official language for pimping out CAD software ... for all the good it did.
    Though AutoCAD had integrated David Betz's Xlisp into AutoCAD as AutoLisp, the Mech Tech students just 5 years behind me were befuddled by it, though they used magical incantations distributed in CAD magazines, without understanding them at more than a superficial level.
    The prof in the mech tech program knew BASIC and introduced his students to the joys of AutoCAD, the CADkey, then whatever else appeared on the market as off-the-shelf products.
    With never-the-twain-may-meet IA DIY coding of one's OWN algorithms, which our class had done using Statics and Strength of Materials as our domain of application manifesting among those capable of coding said apps in BASIC.
    The chasm only widened as the years and decades when by.
    Unlike my peers in that Mech Tech program, I went on to study computer science and electrical engineering tech.
    When I entered the work world I had a background and know-how in software engineering.
    But whose side was I on?
    My IA comrades who once coded Statics and Strengths of materials ... but whom passively stood by as those skills were outsourced to CS weenies who didn't know jack shit about the apps they were coding ... or those self-same CS weenies?
    I held both with contempt for not occupying the middle ground wherein those who knew their shit about a domain of application did not `code' and those who ended up gainfully employed doing `coding' didn't know jack shit about the domain of application.
    Although Ivan Sutherland came up with propagation of constraints as a means of solving for unknowns on par with Simultaneous Equations as taught by the math weenies occupying slots teaching Algebra, THAT whole field -- mathematics -- has become as incalcitrant at the Catholic Priesthood which Marin Luther railed against for using Liturgical Latin.
    Fast forward to Present.
    Who CARES?
    The smartphones are now more capable than the supercomputers of the 80s, and their users routinely fail the requirement to be at least 10% smarter than the equipment the= are operating.
    What student of mech tech or welding is going to cultivate an attitude of Intelligence Augmentation sufficient to forgo the temptations of using off-the-shelf apps, even if they don't work and play well together?
    Yes, Emacs can be used to edit AutoLisp and visualisp, as well as scheme.
    Who is left to CARE?
    I can transcribe Algebra notation into elisp, but who cares?
    People don't seem concerned with augmenting their personal intelligence via algorithms AT ALL, let alone via lisp.
    I'm impressed that you've implementing welding formulae in elisp notation, Richard.
    I'm disappointed that more are interested in AI -- as some magical whizzbang tech which will SOME DAY benefit them some day in some way -- than in IA using, say, lisp syntax
    Its seems that you took matters into your own hands and came up with Intelligence Augmentation suitable to your purposes!
    Cheers!
    --- Synchronet 3.21d-Linux NewsLink 1.2