Top
Best
New

Posted by helloplanets 21 hours ago

The seven programming ur-languages (2022)(madhadron.com)
295 points | 113 commentspage 3
anthk 17 hours ago||
- Algol 68 docs: https://algol68-lang.org/resources 'a68g' it's a free as in freedom compiler.

- Forth: you can use PFE,Gforth for ANS Forth requeriments. Or EForth if you reached high skills levels where the missing stuff can be just reimplemented.

EForth under Muxleq: https://github.com/howerj/muxleq I can provide a working config where a 90% of it would be valid across SF.

Starting Forth, ANS version: https://www.forth.com/starting-forth/

Thinking Forth, do this after finishing SF: https://thinking-forth.sourceforge.net/

Also, Forth Scientific Library. You can make it working with both GForth and PFE, just read the docs.

Full pack: https://www.taygeta.com/fsl/library/Library.tgz

Helping Forth code for GForth/PFE. If you put it under scilib/fs-util.fs, load it with:

    s" scilib/fsu-util.fs" included


https://www.taygeta.com/fsl/library/fsl-util.fs

- Lisp. s9fes, it will compile under any nix/Mac/BSD out there, even with MinC.

S9fes: http://www.t3x.org/s9fes/

Pick the bleeding edge version, it will compile just fine.

For Windows users: MinC, install both EXE under Windows. First, mincexe, then buildtools*exe: https://minc.commandlinerevolution.nl/english/home.html

Then get 7zip to decompress the s9fes TGZ file, cd to that directory, and run 'make'.

Run ./s9 to get the prompt, or ./s9 file.scm where file.scm it's the source code.

In order to learn Scheme, there's are two newbie recommended books before "SICP".

Pick any, CACS, SS, it doesn't matter, both will guide you before SICP, the 'big' book on Scheme:

Simply Scheme https://people.eecs.berkeley.edu/~bh/pdf/

Simply.scm file, select from ';;; simply.scm version 3.13 (8/11/98)' to '(strings-are-numbers #t)' and save it as simply.scm

https://people.eecs.berkeley.edu/~bh/ssch27/appendix-simply....

Concrete Abstractions

Book:

https://www.d.umn.edu/~tcolburn/cs1581/ConcreteAbstractions....

The SCM files needed to be (load "foo.scm") ed in the code in order to do the exercises:

https://github.com/freezoo/scheme-concabs

If you are en Emacs user, just read the Elisp intro, it will work for a different Lisp family but with similar design.

Spot the differences:

Scheme (like s9):

    (define (square x)
     (* x x))
We try:

    >(square 20) 
    400
Elisp/Common Lisp (as the web site shows):

    (defun square (x)
     (* x x))
Same there:

     >(square 20)
     400
- Ok, ML like languages:

https://www.t3x.org/mlite/index.html

If you follow the instructions on compiling s9, mlite it's similar with MinC for Windows. If you are a Unix/Linux/Mac user, you already know how to do that.

You got the whole docs in the TGZ file, and the web.

tmtvl 16 hours ago||
For Lisp one could also start with Common Lisp: A Gentle Introduction to Symbolic Computation (<https://www.cs.cmu.edu/~dst/LispBook/book.pdf>) and follow it with SBCL.
anthk 16 hours ago||
Yep, and after that I'd jump into PAIP, Paradigms of AI Programming.

Code: https://github.com/norvig/paip-lisp

The EPUB looks broken in my machine, try the PDF: https://commons.wikimedia.org/wiki/File:Peter_Norvig._Paradi...

Altough Scheme and CL are different paths. CL's loop it's really, really complex and Scheme it's pretty much straightforward to understand. Any advanced CL user will have to implement Scheme's syntax (and an interpreter) as an exercise for PAIP. CL in CL... well, CL is too huge, T3X tried with Kilo Lisp 23 http://t3x.org/klisp/22/index.html and I doubt if anyone can even complete anything but the few starting chapters from Intro to Common Lisp with it.

pasc1878 16 hours ago||
Or for Lisp you might as well start with Emacs Lisp - you are going to use it for a decent environment unless you have the Common Lisp IDEs which you have to pay for or Racket.
anthk 16 hours ago||
Eh, no. You have Elisp+cl-lib but SBCL too, and you can use Sly wth SBCL.

Of Lem with SBCL+Quicklisp:

https://lem-project.github.io/usage/common_lisp/

Huge tip: if you use MCCLIM, install Ultralisp first and (ql-quickload 'mcclim) later: it will give you a big speed boost. Big, not as the ones from Phoronix. Actually big. From 'I can almost see redrawing on a really old ass netbook' to 'snappy as TCL/Tk' under SBCL.

https://ultralisp.org/

As you can see, you don't need to pay thousands of dollars.

For Scheme, S9 just targets R4RS but as a start it's more than enough, and for SICP you can install Emacs+Geiser+chicken Scheme and from any Linux/BSD: distro command prompt, you run:

       sudo  chicken-install srfi-203
       sudo chicken-install srfi-216
And, as a ~/.csirc file:

      (import scheme)
      (import (srfi 203))
      (import (srfi 216))
To run SCM stuff for SICP:

       csi yourfile.scm 
or

       chicken-csi yourfile.scm
Done. Get the SICP PDF and start doing SICP. You can use Emacs+Geiser with

         M-x install RET geiser-chicken

 if you are lazy. You can install the SICP book with

        M-xpackage-install RET sicp
and read it from

       M-x info RET
and do it everything from withing Emacs by running

      M-x geiser 
(pick chicken as the interpreter). Save your Emacs settings. Done.
kasitmp 11 hours ago||
Plankalkül
eesmith 7 hours ago||
Which category is TRAC? https://en.wikipedia.org/wiki/TRAC_(programming_language)
knome 10 hours ago||
I would add another to the list, which is languages where every expression yields zero or more values, particularly `jq`. there are some antecedents in Icon and xquery, but these generally require explicitly opting into either production or consumption of value streams, where jq does this stream processing automatically from the ground up. (icon requires use of a suspend and needs an every clause to walk the generated values, xquery requires explicit 'for' statements over streams as many builtin operators fail on value streams)

in jq, the comma separates expressions, which independently yield values. a span of such expressions is called a 'filter', since they are always run by passing values from the prior filter into them (with the initial values sourcing from json objects on stdin, or an implicit null if you pass -n to the program).

    $ jq -nc ' def x: "a", "b", "c" ; def y: 1, 2, 3 ; x, y '
    "a"
    "b"
    "c"
    1
    2
    3

    $ jq -c '. + 10, . + 20' <<< '1 2 3'
    11
    21
    12
    22
    13
    23
brackets collect values yielded inside of them.

    $ jq -nc ' def x: "a", "b", "c" ; def y: 1, 2, 3 ; [x,y] '
    ["a","b","c",1,2,3]
if you have a complex object that includes multiple expressions yielding multiple values, construction will permute over them.

    $ jq -nc ' def x: "a", "b", "c" ; def y: 1, 2, 3 ; {"foo": x, "bar": y} '
    {"foo":"a","bar":1}
    {"foo":"a","bar":2}
    {"foo":"a","bar":3}
    {"foo":"b","bar":1}
    {"foo":"b","bar":2}
    {"foo":"b","bar":3}
    {"foo":"c","bar":1}
    {"foo":"c","bar":2}
    {"foo":"c","bar":3}
the pipe operator `|` runs the next filter with each value yielded by the prior, that value represented by the current value operator `.`.

    $ jq -nc ' 1,2,3 | 10 + . '
    11
    12
    13
    $ jq -nc ' 1,2,3 | (10 + .) * . '
    11
    24
    39
binding variables in the language is similarly done for each value their source yields

    $ jq -nc ' (1,2,3) as $A | $A + $A '
    2
    4
    6
functions in the language are neat because you can choose to accept arguments as either early bound values, or as thunks, with the former prefixed with a $.

for example, this runs `. + 100` parameters context, with `.` as the 10,20,30 passed to it:

    $ jq -nc ' def f($t): 1,2,3|$t ; 10,20,30|f(. + 100) '
    110
    110
    110
    120
    120
    120
    130
    130
    130
where this runs `. + 100` in the context of its use inside the function, instead receiving 1,2,3:

    $ jq -nc ' def f(t): 1,2,3|t ; 10,20,30|f(. + 100) '
    101
    102
    103
    101
    102
    103
    101
    102
    103
so you could define map taking a current-value array and applying an expression to each entry like so:

    $ jq -nc ' def m(todo): [.[]|todo] ; [1,2,3]|m(. * 10) '
    [10,20,30]
it's a fun little language for some quick data munging, but the semantics themselves are a decent reason to learn it.
pfdietz 17 hours ago||
Another direction to explore logic languages is Datalog.
jounker 6 hours ago|
I think damalig falls cleanly into the prolog family.
LeCompteSftware 14 hours ago||
Lots of us are having fun identifying our choice for missing family :)

One I might suggest is scripting languages, defined loosely by programming tools which dispatch high-level commands to act on data pipelines: sed, AWK, the sh family, Perl, PowerShell, Python and R as honorary members. In practice I might say SQL belongs here instead of under Prolog, but in theory of course SQL is like Prolog. Bourne shell might be the best representative, even if it's not the oldest.

AWK et al share characteristics from ALGOL and APL, but I feel they are very much their own thing. PowerShell is quite unique among modern languages.

analog31 13 hours ago|
I'd add dataflow "languages" such as Excel and LabVIEW.
rramadass 15 hours ago||
Folks might find the following useful for studying PLs;

1) Advanced Programming Language Design by Raphael Finkel - A classic (late 90s) book comparing a whole smorgasbord of languages.

2) Design Concepts in Programming Languages by Franklyn Turbak et al. - A comprehensive (and big) book on PL design.

3) Concepts, Techniques and Models of Computer Programming by Peter Van Roy et al. - Shows how to organically add different programming paradigms to a simple core language.

recursiveranter 10 hours ago||
[dead]
davidguetta 14 hours ago|
laugh in vibe coding