Scheme – Wisdom and Wonderhttps://www.wisdomandwonder.com
Creativity and MathematicsSun, 18 Nov 2018 20:56:30 +0000en-UShourly1https://wordpress.org/?v=4.9.8https://www.wisdomandwonder.com/wp-content/uploads/2016/03/cropped-WisdomAndWonderLogoFavicon-1-32x32.pngScheme – Wisdom and Wonderhttps://www.wisdomandwonder.com
3232A Scheme Dialect Based Emacs Clonehttps://www.wisdomandwonder.com/article/10364/a-scheme-dialect-based-emacs-clone
https://www.wisdomandwonder.com/article/10364/a-scheme-dialect-based-emacs-clone#respondSun, 21 Aug 2016 19:27:00 +0000https://www.wisdomandwonder.com/?p=10364Femto-Emacs is an Emacs clone built on the Scheme dialect femtolisp.
]]>https://www.wisdomandwonder.com/article/10364/a-scheme-dialect-based-emacs-clone/feed0If You Like LISP Then You’ll Love APLhttps://www.wisdomandwonder.com/article/10231/if-you-like-lisp-then-youll-love-apl
https://www.wisdomandwonder.com/article/10231/if-you-like-lisp-then-youll-love-apl#commentsThu, 12 May 2016 23:12:00 +0000https://www.wisdomandwonder.com/?p=10231Continue reading "If You Like LISP Then You’ll Love APL"]]> Notes on Transcription of a talk given by Professor Perlis at the APL’78 Conference held at Foothill College, Los Altos, CA. on 1978-03-29 revealed these gems:

Contains all of the best attributes of written language

Contains all of the best attributes of LISP… just more so

Is a lyrical language

Notes follow…

Paragraphs starting at 1:

1

Apostate: someone whose beliefs have changed and who no longer belongs to a religious or political group

“under the influence”

“Like all people who enter interesting things late in life, one tends to go over one’s head very quickly.”

2

Row order: Bauer|Perlis|Dijkstra

3

“My God, there must be something in this language (APL).”

APL takes on the properties of the viewer

4

“What attracted me, then, to APL was a feeling that perhaps through APL one might begin to acquire some of the dimensions in programming that we revere in natural language — some of the pleasures of composition; of saying things elegantly; of being brief, poetic, artistic, that makes our natural languages so precious to us. That aspect of programming was one that I’ve long been interested in but have never found any level for coming close to in my experience with (other) languages”

WOW

“It was clear in those languages that programming was really an exercise in plumbing. One was building an intricate object, and the main problem was just to keep your head above water. But, so difficult is it to keep your head above water with those languages”

5

It’s unnecessary that APL ever run on a computer: 1963

Notation for expressing algorithmic concepts

Happy accident: System 360 and Iverson not at Harvard

6

His interests don’t like up with the majority

APL is approaching a kind of completeness

Every user approaches APL differently

People don’t mind using a language if they get things done and feel kind of good doing it; no matter how bad the language it

FORTRAN will pay bills for a long time; don’t throw APL (aka have a bowel movement) in people’s Wheaties

About every language ever

And it certainly shouldn’t be a goal of people who use APL to stand forth and
say, “Why do you jackasses use these inferior linguistic vehicles when we have
something here that’s so precious, so elegant, which gives me so much
pleasure? How can you be so blind and so foolish?” That debate you’ll never
win, and I don’t think you ought to try.

7

Adding new language features tends to add new problems

8

WOW follows

What many of us forget — and we should never forget, of course — is that
programming step-by-step must someday, though we don’t know how, reach the
point where it is universally capable of expressing our thoughts, at least
insofar as they involve giving prescriptions on how to do things. Programming
is thinking — not all thinking yet, and maybe never all thinking — but insofar
as when we sit down at the computer we are faced with so many attractive
possibilities which never occurred to us until we programmed, insofar as that
happens, we are going to be dissatisfied with the programming languages we
have. And that includes every language that’s ever been created and those yet
to come — and there will be others yet to come.

9

The idea that one language is perfect for teaching is false

The invention of constructions is “learning to program”

We curse those inventions, but that which we must invent will never be there, so it must be invented

Reminiscent of LISP

We invent (construct) more and more, killing elegance

10

“…the quest for the perfect”

Makes me think of LISP

Every language is the language of tomorrow

APL has something extra though

11

“LISP has a very precious character, if indeed there are some people who can express programming ideas to other people in the language in which they program.”

WOW

APL has this property to a far greater degree

WOW follows

I can’t do that with ALGOL; never have I been able to do it with ALGOL.
Whenever I’ve programmed in ALGOL and I’ve wished to make some statements
about the program I was writing, I was forced to go outside the language and
use English, or mathematics, or some block diagrams or what-not. In APL, I
find that to a far greater degree than any other language that I’ve used, I
can make statements about the programs that I’m writing, in APL — actually not
exactly APL, but APL with some nice little extensions that I dream up at the
moment but would never think of implementing. But by and large, I find that
the language allows me to express myself, in the language, about the things
I’m dealing with. I find that a very precious property of a programming
language.

12

APL is lyrical

Programming APL is fun, charming, and pleasant

Perl?

Only one way to do things make programming dull

Perlis, certainly LISPism

13

“God made us all different.”

You can say things different ways using language

Makes reading fun

“… it’s a pleasure to read (something) when it’s written by someone who has that talent”

“If Shakespeare were alive today, he’d be a programmer, and he’d be writing one-liners in APL.”

WOW

14

1 problem, 50 people, 40 different solutions

Lets people think originally and possibly poorly

Gives APL a literary quality

Efficiency is important, so are infinite other criteria

15

Elegant and clever are praiseworthy

“My God, that’s wonderful! That’s a mechanism!”

16

“APL Pornography” “thrives not because we’re evil, but because we’re human”

ONE liners are the first step in learning APL

Never use control structures when you are first learning

17

Eventually everything “just fits”

18

Avoid the “the dumbbell model of a language” utilization

High at both ends

Barely used in the middle

19

APL is not perfect, no language is

“the commerce of programs” will not elevate APL to the next level

20

NA

21

Fortran was built for the hardware

APL wasn’t built to fit computers

A stream processing language, parallel?

22

Thoughts about how to realize the stream model

23

“we’ve got to get BASIC out of the public school system. BASIC is really harmful for young people. It’s all right for old-timers.”

“once you’ve learned APL, you know BASIC, you know FORTRAN, you know ALGOL, indeed, I think you know all programming languages. You don’t know how you know them, but you know them.”

24

“arrays, by-and-large, are used by you as control carriers through which you blast sequences of operations. And the use of rank is merely a convenient method of carrying small arrays on the backs of larger arrays. ”

25

NA

26

“Hardware drives our field”

“APL is just the ideal language, or closer than any other language, for using that real estate”

]]>https://www.wisdomandwonder.com/article/10231/if-you-like-lisp-then-youll-love-apl/feed7Chez Scheme Now Open Sourcehttps://www.wisdomandwonder.com/article/10208/chez-scheme-now-open-source
https://www.wisdomandwonder.com/article/10208/chez-scheme-now-open-source#commentsSun, 01 May 2016 15:13:00 +0000https://www.wisdomandwonder.com/?p=10208Continue reading "Chez Scheme Now Open Source"]]> The other night I was daydreaming about buying a Chez Scheme license so I checked up on their license costs.

This is an interpreter for a really simple dynamically scoped Scheme dialect. It only runs with Gforth, because it uses Gforth’s structs to implement its data structures.

]]>https://www.wisdomandwonder.com/link/9823/a-scheme-interpreter-in-forth/feed4Mastery, Questions, Hardware, Software, LISP, Forth, TI-99/4Ahttps://www.wisdomandwonder.com/article/9819/mastery-questions-hardware-software-lisp-forth-ti-994a
https://www.wisdomandwonder.com/article/9819/mastery-questions-hardware-software-lisp-forth-ti-994a#commentsSun, 05 Jul 2015 16:17:54 +0000https://www.wisdomandwonder.com/?p=9819Continue reading "Mastery, Questions, Hardware, Software, LISP, Forth, TI-99/4A"]]>
Over the last two years a few questions and ideas have visited me and the following is my attempt to piece them together…

Does every mathematician require an intuitive sense of the value of the
transistor?

It is time to start studying closer the bare metal. What is the best place to start? What are my requirements? There are only two requirements. First, I want to go through the process of learning and exploration interactively and quickly. Those are the traits of a LISP system. Second, I want it to be super inexpensive. Everyone with a television set and a keyboard should be able to follow the same approach. They shouldn’t even require the Internet. If they have Internet at work or school then they can use the Sneakernet. It should be trivial to sell this system for next to nothing. The computer will have video and sound too. It even has a beautiful HD screen. That is it. With that in mind I started looking.

The relationship between the programming language and hardware is tightly woven. Most of us don’t consider this today because we own machines that spend 99% of their time idle. Looking at languages and inexpensive hardware is a real treat because you start caring real quick! Quickly, too, I ended up on Armpit Scheme.

Every LISP programmer implements their own LISP! Or so the say, I never did. I still want to. This seems like the perfect project: C language, bare metal, and LISP, on some serious hardware. Doing some light reading about LISP on small devices, my imagination took over and quickly concluded that the next logical step was to rebuild a Lisp Machine from scratch! No, that is a little too far out of scope. Armpit seems like a fine place to start so I read about the development boards where it runs. Then the two things slowly effected this vector.

One of my best friends Bruce had loved to share with me his delight in programming FORTH. Scheme was my enlightenment tool, and his was FORTH. We would spend hours talking about both of them. Our conversations went something like this: “Me: In Scheme I explored X, and it was fun!” and then “Bruce: I explored that very idea in FORTH and this is how I did it and it was fun!”. FORTH was built to run on small CPUs. That got me learning more about FORTH.

There are a lot of distributions. There are great books about it. The community is passionate. One of the rights of passage is to write your own FORTH. It runs on a lot of CPUs. That was enough to convince me. Around the same time, something else was on my mind: Vintage Computers.

As a kid we had an Apple 2e. It was a delightful machine. Perhaps that is the right place to start? Watching craigslist and estate sales, there weren’t very many. The market is demanding them again, and on ebay they are making some money. Still, it has all the right traits now: simple, keyboard, video and sound and disk, and constrained. It ought to be inexpensive, but isn’t right now. That is OK. Months go by and I keep poking around at things. Two things jump out as possible options.

The TI Launchpad is a $9.99USD computer. It is 16-bit, has memory, and it is fast. It runs at least CamelForth, 4E4th, eForth, and 430eForth. Pay attention to the names involved. The community is small and tight knit. Implementing FORTH seems like a great way to learn/master Assembly, C, hardware, and FORTH. The source code and hardware are out there. I will go with 430eForth and the LaunchPad machine. Around the same time while learning more about FORTH I ended up back on a vintage machine option for FORTH.

The old personal computers all either included or had available, FORTH. Most of them are available free in source form today. It could be fun to use and learn on a vintage box because that is all bare metal. Low and behold, I end up watching this video to learn about TurboForth.

TurboForth is a 2015 FORTH implementation for the TI-99/4A. Perfect. Perfect! Using a real PC, you get the fun of exploring a machine with video memory and making sounds. That is just included because it is a personal computer. TurboForth lets you explore the hardware, the machine, and even the implementation itself. That is just wonderful. There is another cool part: the TI-99/4A has a very active community.

They’ve got an active user group right down in Chicago. They’ve got a conference this October! There is hardware and software to connect your box to USB storage or a hard drive. There are loads of youtube videos about it. It helps that the machine is still available at a very reasonable price. To top it off, there are first class emulators out there. People are still writing games for this machine today, in FORTH nonetheless. There are lot of good games for it, too.

The TI-99/4A and the TI Launchpad seem like fine places to start. They meet all of the requirements. Without having dug into the details, the above are assumptions, and that is a fine place to start.

It is important to distinguish between the mathematical numbers, the Scheme objects that attempt to model them, the machine representations used to implement the numbers, and notations used to write numbers.