Thank you for the nice article. I have comments regarding Seed7:
1. Seed7 goes byond Pascal. It is extensible and has many advanced features, like user defined statements (see Seed7 FAQ).
2. The Seed7 compiler accepts the option -O2, which reduces the size of the executable.
3. There are several libraries (approx. 50 of them) shipped with Seed7 and this libraries are discribed at: http://seed7.sourceforge.net/libraries
Have a nice day
Sven
Hi Sven, thanks a lot for your answer! I’ll try to update my article as soon as possible! When I mentioned Pascal I was basically thinking about the syntax, not so much about the features itself. The code looks a bit like Pascal, I’m sure Seed7 has more/new features when compared to Pascal.
Remo
> [GCJ] There might have been a way to compress that file or remove some unused calls
The output of GCJ contains a lot of symbol information, which is only really useful if you want verbose stack traces. Those symbols can be removed like so: strip hello
Scott, you’re right, I was able to remove almost 28MB, making a total of 14MB. Still big for a hello world but a lot better! Thanks!
Debugging information can be removed from every executable. E.g.: Applying strip to the compiled hello world example of Seed7 reduces it to 130408 bytes.
BTW: I don’t see that it has a dependency on X11 and ncurses. Maybe this is because I use the latest release ((2011-10-03).
BTW2: The option to optimize is -O2 (without space).
Thank you for the link to Rosetta Code
( http://rosettacode.org/wiki/Seed7 ), I was not aware of it.
Have a nice day
Sven
Sven, thanks for you comment! As a matter of fact the dependencies have been removed in a recent version!
Hi Remo,
I heartily enjoy articles of this kind and really love to see that you simply used some “lesser-known” languages to see if they do the job better without prejudices or unnecessary caution regarding feature completeness.
Thanks for that Remo!
Languages useful for mathematical solutions that come into my mind are J(-Programming Language) and Julia. http://www.jsoftware.com/ and http://julialang.org/ I’ve experimented a little with APL, but J is free, where APL is not.
I’ve run some benchmarks with Opa it’s not the fastest out there, but it’s quite secure as far as I’ve tested. http://opalang.org/ I guess it won’t run on most hosts though.
Best wishes
Ferhat
Hey Ferhat,
thanks for those links! I’ve played around with Julia before (the programming language I mean) but didn’t really like the syntax. Never heard of Zimbu or Opa but those looks really nice! Opa might not be the fastest but it’s looks very clean and the documentation also looks rather complete!
I’ll try to have a look at these languages soon and post another article about it. I didn’t get many visitors on this article but I like that kind of stuff a lot. Glad I’m not the only one 😉
Remo
heheh I know you played with Julia 😉
It’s a lot better than APL/Matlab/R can’t tell if it’s better than J,
but the advantage of Julia is that it’s a lot easier to learn than J, which is a greaaat Plus.
There’s another great thing that I’m playing around with a lot, that is the G-WAN Application Server. http://gwan.ch/ I’d visit the Author if I was in wonderful Switzerland 🙂
You can use any number of languages within it, that’s why I also played with Julia 😉
It’s great as Back-End language for Stochastic Operations on Data-Sets that are processed with ANSI C (scripts).
Recently I took a look at Seed7 again. There were some changes.
Interpreter and compiler have been renamed. The new names are s7 and s7c.
The compiler now produces smaller executables. On my machine the executable
of the hello world example has a size of 49063 bytes.
I found also some progress in the area you mentioned (small socket server).
There is a type named pollData, which provides an interface to poll() (see http://seed7.sourceforge.net/libraries/poll.htm ). A higher level interface
via the function waitForRequest seems to simplify the task of writing a
server even more (see http://seed7.sourceforge.net/libraries/listener.htm ).
This higher level interface is used in a ftp server example.
There are also other improvements, but I want to save some space here. 🙂
Have a nice day
Sven
Thanks a lot for the follow-up, much appreciated!
I’ll try to have another look at seed7 someday but I have to finish a few things first before I can spend time on these fun learning things..
You might also like FPC(FreePascal), it’s quite capable and mature, generates static executables with minimal dependencies on many platforms, supports syntax modes, modern features like generics, powerful macros and many interesting features with a clean/readable syntax and good IDEs.
If you prefer newer technologies Go and Rust may be more to your taste.
13 Comments
Thank you for the nice article. I have comments regarding Seed7:
1. Seed7 goes byond Pascal. It is extensible and has many advanced features, like user defined statements (see Seed7 FAQ).
2. The Seed7 compiler accepts the option -O2, which reduces the size of the executable.
3. There are several libraries (approx. 50 of them) shipped with Seed7 and this libraries are discribed at:
http://seed7.sourceforge.net/libraries
Have a nice day
Sven
Hi Sven, thanks a lot for your answer! I’ll try to update my article as soon as possible! When I mentioned Pascal I was basically thinking about the syntax, not so much about the features itself. The code looks a bit like Pascal, I’m sure Seed7 has more/new features when compared to Pascal.
Remo
> [GCJ] There might have been a way to compress that file or remove some unused calls
The output of GCJ contains a lot of symbol information, which is only really useful if you want verbose stack traces. Those symbols can be removed like so: strip hello
Scott, you’re right, I was able to remove almost 28MB, making a total of 14MB. Still big for a hello world but a lot better! Thanks!
Debugging information can be removed from every executable. E.g.: Applying strip to the compiled hello world example of Seed7 reduces it to 130408 bytes.
BTW: I don’t see that it has a dependency on X11 and ncurses. Maybe this is because I use the latest release ((2011-10-03).
BTW2: The option to optimize is -O2 (without space).
Thank you for the link to Rosetta Code
( http://rosettacode.org/wiki/Seed7 ), I was not aware of it.
Have a nice day
Sven
Sven, thanks for you comment! As a matter of fact the dependencies have been removed in a recent version!
Hi Remo,
I heartily enjoy articles of this kind and really love to see that you simply used some “lesser-known” languages to see if they do the job better without prejudices or unnecessary caution regarding feature completeness.
Thanks for that Remo!
Languages useful for mathematical solutions that come into my mind are J(-Programming Language) and Julia. http://www.jsoftware.com/ and http://julialang.org/ I’ve experimented a little with APL, but J is free, where APL is not.
I’m going to look into http://www.zimbu.org/ and http://chapel.cray.com/ a little more because they look much more promising
I’ve run some benchmarks with Opa it’s not the fastest out there, but it’s quite secure as far as I’ve tested. http://opalang.org/ I guess it won’t run on most hosts though.
Best wishes
Ferhat
Hey Ferhat,
thanks for those links! I’ve played around with Julia before (the programming language I mean) but didn’t really like the syntax. Never heard of Zimbu or Opa but those looks really nice! Opa might not be the fastest but it’s looks very clean and the documentation also looks rather complete!
I’ll try to have a look at these languages soon and post another article about it. I didn’t get many visitors on this article but I like that kind of stuff a lot. Glad I’m not the only one 😉
Remo
heheh I know you played with Julia 😉
It’s a lot better than APL/Matlab/R can’t tell if it’s better than J,
but the advantage of Julia is that it’s a lot easier to learn than J, which is a greaaat Plus.
There’s another great thing that I’m playing around with a lot, that is the G-WAN Application Server.
http://gwan.ch/ I’d visit the Author if I was in wonderful Switzerland 🙂
You can use any number of languages within it, that’s why I also played with Julia 😉
It’s great as Back-End language for Stochastic Operations on Data-Sets that are processed with ANSI C (scripts).
[…] might have seen my previous article about creating executables without dependencies http://www.codeblog.ch/2011/06/statically-linked-linux-executables/. While I still try to focus on Oracle and concrete5, there’s often a situation where I have […]
Hi Remo,
Recently I took a look at Seed7 again. There were some changes.
Interpreter and compiler have been renamed. The new names are s7 and s7c.
The compiler now produces smaller executables. On my machine the executable
of the hello world example has a size of 49063 bytes.
I found also some progress in the area you mentioned (small socket server).
There is a type named pollData, which provides an interface to poll() (see
http://seed7.sourceforge.net/libraries/poll.htm ). A higher level interface
via the function waitForRequest seems to simplify the task of writing a
server even more (see http://seed7.sourceforge.net/libraries/listener.htm ).
This higher level interface is used in a ftp server example.
For people, who use Windows, there is also a self extracting archive of
Seed7 (see http://sourceforge.net/projects/seed7/files/bin ).
There are also other improvements, but I want to save some space here. 🙂
Have a nice day
Sven
Thanks a lot for the follow-up, much appreciated!
I’ll try to have another look at seed7 someday but I have to finish a few things first before I can spend time on these fun learning things..
You might also like FPC(FreePascal), it’s quite capable and mature, generates static executables with minimal dependencies on many platforms, supports syntax modes, modern features like generics, powerful macros and many interesting features with a clean/readable syntax and good IDEs.
If you prefer newer technologies Go and Rust may be more to your taste.