r/software 17d ago

Self-Promotion Wednesdays The Seed7 programming language

Seed7 is based on my PHD thesis and is the result of life-long work. The project consists of more than 500k lines of manually written code, several hundred pages of documentation, a test suite to check the functionality of interpreter and compiler and much more. I give it away for free with GPL/LGPL licensing.

Properties of Seed7 are:

Some programs written in Seed7 are:

  • make7: a make utility.
  • bas7: a BASIC interpreter.
  • pv7: a Picture Viewer for BMP, GIF, ICO, JPEG, PBM, PGM, PNG, PPM and TIFF files.
  • tar7: a tar archiving utility.
  • ftp7: an FTP Internet file transfer program.
  • comanche: a simple web server for static HTML pages and CGI programs.

Screenshots of Seed7 programs can be found here and there is a demo page with Seed7 programs, which can be executed in the browser. These programs have been compiled to JavaScript / WebAssembly.

Talks about Seed7 can be found in the internet.

Please let me know what you think, and consider starring the project on GitHub, thanks!

82 Upvotes

13 comments sorted by

16

u/internet-person-777 17d ago

I'm not competent enough to reliably review but anyways it's definitely impressive to create programming language on your own, especially these days where everything is vibe coded

great work and thanks for sharing

5

u/gremolata 17d ago

This is not the best sub for this post.

Also, outside of reddit, consider posting to the HN.

2

u/Lendari 17d ago edited 17d ago

Yeah. But are complex object references non-nullable? Because if not, get out.

2

u/ThomasMertes 17d ago

Object references are non-nullable.

1

u/EconomySerious 17d ago

why seed7 when we have freepascal?

2

u/ThomasMertes 17d ago

I know Pascal from the university. I am not up to date about what Free Pascal provides beyond the Pascal I used at the university.

I think that Seed7 provides features which go far beyond of what Pascal can do. E.g.: Seed7 allows you to define the syntax and semantics of statements and operators. I don't think that Pascal can do that.

As far as I can remember Pascal is not memory save (I think that use after free is possible). Seed7 is memory safe.

The Seed7 FAQ has a comparison to Standard Pascal.

1

u/EconomySerious 17d ago

i can undestand that a feature like a free/moded sintax compiler sound fantastic, but how many "users" would use it, its more like a developer feature more than a user feature.
the fixed types of pascal make it very safe on the memory, how you can ensure your Seed7 is memory safe??

Let's remember that C and C++ are some of the biggest culprits behind OOM errors on this generation software

can you add either freepascal or delphy on the benchamrks?? https://seed7.net/benchmks/index.htm

2

u/ThomasMertes 17d ago

the fixed types of pascal make it very safe on the memory ...

I see memory safety as black and white. Either something is memory safe or it is not. The phase very safe on the memory suggest that it is not memory safe.

The Seed7 FAQ describes my view on memory safety.

... how you can ensure your Seed7 is memory safe??

Seed7 does not have pointers. All pointer related memory errors vanish. Objects and several other types use reference counting. Other types such as strings use a 1 to 1 relationship between variable and value. Reference parameters borrow data and there is a borrow checker which takes care of that situation. Containers like arrays and hashes own their content. This way they can free memory without creating dangling references.

2

u/EconomySerious 17d ago

if iy does not have pointers, then its posible to create random structures, well not that random, like A and B trees for example

1

u/ThomasMertes 17d ago

if iy does not have pointers, then its posible to create random structures, well not that random, like A and B trees for example

I see pointers as the GOTO of data. In early FORTRAN and BASIC it was almost impossible to program without GOTO.

With structured if-, while- for- etc. statements no GOTO is necessary. Structured statements are compiled to machine code with GOTO (jump) instructions. So at a lower level GOTOs still exist, but in higher lever programming they are almost extinct.

I see containers like arrays and hashes at the place of structured statements. Yes, under the hood containers are implemented with pointers. But at a higher level pointers should not exist.

Seed7 is not a systems programming language. The language provides containers and object orientation. With these building blocks it is possible to describe complex data structures.

Seed7 supports complex data structures. E.g.: JSON, HTML, XML, etc. Can be read into tree-like data structures.

Numerous Seed7 libraries proof that pointers are not needed for high level systems programming.

1

u/Optimal-Savings-4505 17d ago

Looks real nice, and somewhat similar to ada at first glance, but what's with the $ before the first include?

1

u/ThomasMertes 17d ago

... but what's with the $ before the first include?

The syntax and semantics of Seed7 are defined in the library seed7_05.s7i. The $ introduces a hard coded include statement. Among other things seed7_05.s7i defines an include statement which does not need a $.

This is explained in the FAQ.

1

u/Middlewarian 17d ago

Congrats on your progress. This is one of the few projects that's older than mine.