Why did python took over scheme/lisp in popularity ?

You figger out the action the cpu has to do , you look up the mnemonics and convert it with a table to some hex. No ?
[Cpu being a collection of nor and nand gates performing a task]
 
Ok, but the compiler of the different language had to be compiled too. If you go backwards in time to the very first compiler ever, how did they compile that?
Rear Admiral Grace Hopper would know.
Edit: got beaten to this. It is one of my go-to arguments when "women in IT" gets discussed.
 
Ok, but the compiler of the different language had to be compiled too. If you go backwards in time to the very first compiler ever, how did they compile that?
Nicklaus Wirth on the first working Pascal compiler (the first attempt was to write the compiler in Fortran and it failed):
The second attempt at building a compiler therefore began with its formulation in the source language itself, which by that time had evolved into what was published as Pascal in 1970 [Wirth, 1970], The compiler was to be a single-pass system based on the proven top-down, recursive-descent principle for syntax analysis. We note here that this method was eligible because the ban against recursion had been lifted: recursivity of procedures was to be the normal case. The team of implementors consisted of U. Ammann, E. Marmier, and R. Schild. After the program was completed – a healthy experience in programming in an unimplemented language! – Schild was banished to his home for two weeks, the time it took him to translate the program into an auxiliary, low-level language available on the CDC computer. Thereafter, the bootstrapping process could begin [Wirth, 1971b]. This compiler was completed by mid 1970, and at this time the language definition was published. With the exception of some slight revisions in 1972, it remained stable thereafter.
My one time boss told me he had written a compiler for a Fortran subset and keyed in the code through the front panel switches! This was on a Soviet era Minsk-2 computer with a whopping 4K words of RAM! No assembler either!
 
Yes, front panel switches is as low as you can go. With a computer equipped with these (like e.g. the famous Altair 8800), entering code needs nothing but the hardware. So that's probably your answer on how to bootstrap anything on a microcomputer.

Of course, nobody would do something like this any more even with a completely new architecture. It's nowadays much easier to create some cross-development tools (relying on existing software on other machines) to get something up and running on the new one.
 
Perl:
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
This is a valid Perl program. :eek:
(It prints "Just another Perl / Unix hacker")
 
Interesting ideas.
But there is also a very simple way.
When you code use brackets, when you reread your own code for errors hide the brackets simply in your editor, in order not to spoil your view.
The advantage of using brackets when you code is that the editor can quickly indent as needed and check if they are balanced, so you wrote what you meant.
I remember my problems when writing a bit of ansible yaml and braking my head over a wrong space or tab.
 
Perl:
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
This is a valid Perl program. :eek:
(It prints "Just another Perl / Unix hacker")
Holy crap!!! 🤣
 
Well, if that's a quality in itself? 🤔
Not really. You are correct. I was just kidding.

I still like languages that come with a compiler written in that very language… :cool: (Yes, I'm old…)
Did you use the word "old" as logical equivalence of "wise"?

Ok, but the compiler of the different language had to be compiled too. If you go backwards in time to the very first compiler ever, how did they compile that?

Technically all you need is digital logic and ISA. Assembler, compilers and OSes are higher abstraction, i.e. there are not essential for a computer to function [*] -- pre 1951 (Maurice Wilkes) machines without hardware level microprogram(microarchitecture) interpreters.

[*] Reference
Tanenbaum, Structured Computer Organization | Section 1.1
 
Tanenbaum, Structured Computer Organization
I have that book from my college years. It was the textbook for one of my classes very early in the curriculum. And it was surprisingly useful reference for explaining stuff much later on.
 
  • Thanks
Reactions: a6h
I have that book from my college years. It was the textbook for one of my classes very early in the curriculum. And it was surprisingly useful reference for explaining stuff much later on.
Indeed. It helped me to understand the problem which eternal_noob was referring to as the "the chicken or the egg".
The questions like how they wrote the first compiler, bootloader, etc. could easily be answered via reading some history.
That book contains enough historical background on computer engineering, to help a reader to answer to his questions.
 
Perl has 64 global special variables.
Except they're not global. They're special, they're globally available, but their value depends on context, thus has limited scope.

Now you could say "global" also means "globally available". Sure, but see how choice of words serves to mislead people (they know what a "global variable" means in programming). An often (maybe involuntarily) used technique when "bashing" something.

It's true though you can write extremely obfuscated perl code. To an extent that some call it a WOL (write only language). But you can do similar in C as well. Still, you can write very readable and well-structured perl code, and I'd always prefer to manually parse this over a heap of parentheses. Yes, in Lisp code, you often have to count them… text markers might help 🥳

BTW, functional languages don't have to look like this. Functions applied after each other can just be written consecutive, instead of nested, for example.
 
Here's a guy designing a bad programming language on purpose by getting inspiration of the worst traits of existent programming languages like PHP (PHP hates programmers), Python and many others, and mixing them together in his own Frankenstein creation thingy. On top of it he's inventing some annoyances on his own.

The language is called BS, tag line: "Why? Because f**k you, that's why!" It's a fun overview about the worst traits of many established programming languages.

View: https://www.youtube.com/watch?v=2mnYf7L7Amw
 
Yeah, but back then in the 70s when INTERCAL was being invented, many of the inspirational sources used by Mark Rendle were not even invented yet.

And part of the fun lies in these inspirations.
 
Of course, just saying the idea for such parodies isn't new ;) back then, some "inspirational" languages offered not much more besides a "goto" for control structures :cool:
 
Agreed!

Talking about Perl: this is some type of more tragic language to me. I mean in the beginning it was what literally powered the first interactions on the web, before Sun decided that putting Java on the web is a good thing. Back then Matt's Script Archive was the thing!

One problem is for me it's slogan "There's more than one way to do it." Later "but sometimes consistency is not a bad thing either" was added. This is a clear contrast to Python's philosophy which is "There should be one-- and preferably only one --obvious way to do it."

So if you've not written some stuff let's just say that many Perl script/programs are not exactly the easiest thing to read and understand around due to that. Meanwhile then PHP happened, which was way easier to setup and integrate within Apache and took off, leaving Perl in the dust.

Another thing was what in the beginning was called Perl 6, and it's long development cycle, which basically is a new programming language. Due to that many programmers left forever.

Perl is one of these languages which got huge momentum in the past, but was unable to build a lasting legacy around it. Aside some standard tools being written in it, it's for sure for most nowadays not the language of choice when writing something up from scratch.

In contrast PHP had huge momentum in the past, but was able to build a lasting legacy around it. Which is why the WWW is still so much depending on it nowadays, rewriting all of that into something else - good luck with that one.
 
In chez-cheme function arguments are evaluated in any order.
In Racket-cheme the evaluation is guaranteed from left to right.
In other words they do have a standard problem
 
I just did a speed comparison of 3 schemes,

1. Kawa-scheme : Time duration : 1.9s
Code:
(define (fib n ::long) ::long
  (if (< n 2)
      n
      (+ (fib(- n 1)) (fib(- n 2)))
  )
)
(display (fib 42))

2.Racket-scheme :Time duration: 4.5s
Code:
#lang typed/racket
(define (fib [n : Integer]) : Integer
  (if (< n 2)
      n
      (+ (fib(- n 1)) (fib(- n 2)))
  )
)
(display (fib 42))

3.Chicken-scheme : Time duration 20s
Code:
(: fib (fixnum -> fixnum))
(define (fib n)
  (if (< n 2)
      n
      (+ (fib(- n 1)) (fib(- n 2)))
  )
)
(display (fib 42))
 
I just did a speed comparison of 3 schemes,

1. Kawa-scheme : Time duration : 1.9s
Code:
(define (fib n ::long) ::long
  (if (< n 2)
      n
      (+ (fib(- n 1)) (fib(- n 2)))
  )
)
(display (fib 42))

2.Racket-scheme :Time duration: 4.5s
Code:
#lang typed/racket
(define (fib [n : Integer]) : Integer
  (if (< n 2)
      n
      (+ (fib(- n 1)) (fib(- n 2)))
  )
)
(display (fib 42))

3.Chicken-scheme : Time duration 20s
Code:
(: fib (fixnum -> fixnum))
(define (fib n)
  (if (< n 2)
      n
      (+ (fib(- n 1)) (fib(- n 2)))
  )
)
(display (fib 42))
I would assume that the times are what it took to run those snippets... is that a correct assumption?
 
Back
Top