seed7-users Mailing List for Seed7 (Page 8)
Interpreter and compiler for the Seed7 programming language.
Brought to you by:
thomas_mertes
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
|
Feb
(9) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(4) |
Aug
|
Sep
(4) |
Oct
(4) |
Nov
|
Dec
(1) |
2011 |
Jan
(2) |
Feb
|
Mar
(8) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(2) |
Aug
(6) |
Sep
(7) |
Oct
(3) |
Nov
(10) |
Dec
(4) |
2013 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
|
Dec
(1) |
2014 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
(1) |
Dec
(1) |
2015 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2016 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(3) |
Dec
(3) |
2021 |
Jan
(2) |
Feb
(6) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(12) |
Oct
(4) |
Nov
(17) |
Dec
(3) |
2022 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
(2) |
May
|
Jun
(17) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
2024 |
Jan
|
Feb
(5) |
Mar
(7) |
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
(12) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2025 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Rugxulo <ru...@gm...> - 2012-11-17 02:48:05
|
Hi, On Fri, Nov 16, 2012 at 7:09 AM, Thomas Mertes <tho...@gm...> wrote: > On Thu, 15 Nov 2012 18:42:01 -0600, Rugxulo <ru...@gm...> wrote: >> >> Periodically, I retest your Seed7 with DJGPP, esp. when I remember >> it's been a few weeks since last time. > > You can subscribe to seed7-users here: > https://lists.sourceforge.net/lists/listinfo/seed7-users Done. :-) > I don't do announcements there either (maybe I should), but it is good > place for Seed7 related questions. It would be nice if you would send > future reports to seed7-users@lists.... This would also > inform others about your findings. Yes, of course, though I'm afraid DJGPP isn't the most popular thing in the world (anymore). >> Anyways, retesting latest download seems to "almost" build and work, >> not counting a few "make depend" errors that it apparently ignores >> (good idea?). > > The program chkccomp.c calls the C compiler several times to probe the > properties of the C compiler and the C run-time library. Normally the > errors generated by compilation attempts are redirected to a file. I knew it was being run but didn't know if it was safe to ignore some errors. Obviously most makefiles know whether to quit or keep going, but sometimes they don't work well when not tested in non-POSIX environments. > IIRC with DJGPP there were some problems with the redirection > of C compiler errors. I don't remember the details, but > REDIRECT_C_ERRORS is not defined in mk_djgpp.mak and this results > in the error messages you saw. I don't remember either. I know we briefly discussed it months ago. IIRC, gcc reports errors to stderr, and DOS' %COMSPEC% doesn't (usually) handle stderr redirection. So DJGPP comes with REDIR.EXE for that case, e.g. "redir -eo gcc ... > blah.txt". > BTW: The "make depend" errors caused by executing chkccomp.exe can be > safely ignored. Maybe I should add > echo "The following C compiler errors can be safely ignored" > to mk_djgpp.mak just before chkccomp.exe is called. Yes, probably. It's just that after certain errors you wonder if it will work at all. Sometimes yes, sometimes no. It's been fine for months, so this is the first (very minor) snafu I've seen. >> Once I do this minor change, then it builds and "hi chk_all" is >> (almost) the same as before (not counting a slight output sequence >> rearrangement about negative zero). >> >> Long story short, it won't actually finish compiling unless I add this >> to version.h : >> >> #define HOME_DIR_ENV_VAR "HOME" /* just a guess but seems to work okay >> */ > > The definition of HOME_DIR_ENV_VAR is generated by chkccomp.c . A missing > definition of HOME_DIR_ENV_VAR in version.h would mean that your > computer does neither define HOME nor USERPROFILE. Can you confirm that > the environment variables HOME and USERPROFILE are not defined on your > computer? That sounds like XP stuff. I don't have XP (anymore), so I can't test there. I can test under raw FreeDOS or DOSEMU or VirtualBox. Usually I just use DOSEMU, for silly reasons. DJGPP doesn't define $HOME nor $USERPROFILE by default. The always-loaded DJGPP.ENV file does have $USER, but I forget when that is loaded and when not. IIRC, I manually edited it to put HOME= under [sh] and [bash] so it wouldn't log Bash's _bhist in the root dir (C:\) accidentally. Though obviously I hate Bash and would prefer to avoid it if at all possible (as we are doing successfully so far). It's a pain, though it "mostly" (?) works, despite being old with a few rare bugs. If you think $HOME and/or $USERPROFILE should be set, I don't know what to tell you. DOS doesn't usually set $HOME because argv[0] can include full path (since DOS 3.x). So usually config files are lumped in the same subdir with their binaries. If really desperate, without a better alternative, I'd probably suggest making and using /dev/env/DJDIR/share/seed7 (since DJGPP must be installed just to build Seed7). There is some other weird stuff in the runtime re: env. vars, but it's not totally useful here, and I'd have to double-check it closer to remember what it does. (Good idea but not totally implemented about falling back to a default user-defined dirpath if env. var. isn't defined.) > In this case I would like to know what directory should be used as > home directory. I'm not sure what specifically would be ideal, honestly, but we can figure something out. > BTW: If HOME is not defined the function homeDir will raise the exception > FILE_ERROR. I don't know which Seed7 tools/examples rely on this, but it would be good to fix. > Many thanks in advance for your effort. More thanks to your efforts for supporting DJGPP. My only regret is not being able to help more. |
From: Thomas M. <tho...@gm...> - 2012-11-15 14:08:37
|
On Wed, 14 Nov 2012 02:31:09 +0100, joh...@so... wrote: > so can you assign to a member of a structured type passed as an actual Sorry. My last mail contained a little typo in the third variable table (The re and im members of the variable b must be swapped). To avoid confusion I resend the example: -------------------------------------------------- The following example shows the differences between "in var" and "inout": The type complex is defined in the library "complex.s7i". This library contains, beside other things, the definition of the following struct: const type: complex is new object struct var float: re is 0.0; var float: im is 0.0; end struct; Now we assume the following three variables were defined: var complex: a is complex(0.0, 1.0); var complex: b is complex(2.0, 3.0); var complex: c is complex(4.0, 5.0); The members re and im get the corresponding values from the initialization: | value | value variable | of re | of im ----------+-------+------- a | 0.0 | 1.0 b | 2.0 | 3.0 c | 4.0 | 5.0 The following function uses "in var" parameters: const proc: func1 (in var complex: par1, in var complex par2) is func begin par1 := c; # Assign new value par2.re := 6.0 # Assign new value to member # Now the parameters par1 and par2 have the new values. # The variables a, b and c stay unchanged. end func; Then the function func1 is called with the actual parameters a and b: func1(a, b); Afterwards the variables a, b and c still have the same values as before: | value | value variable | of re | of im ----------+-------+------- a | 0.0 | 1.0 b | 2.0 | 3.0 c | 4.0 | 5.0 With "inout" parameters this picture changes. The following function uses "inout" parameters: const proc: func2 (inout complex: par1, inout complex par2) is func begin par1 := c; # Assign new value par2.re := 6.0 # Assign new value to member # Now the parameters par1 and par2 have the new values. # The variables a and b were changed together with par1 and par2. # Variable c stays unchanged. end func; Then the function func2 is called with the actual parameters a and b: func2(a, b); Afterwards the values of the variables have changed: | value | value variable | of re | of im ----------+-------+------- a | 4.0 | 5.0 b | 6.0 | 3.0 c | 4.0 | 5.0 I hope this explanation helps. As you can see Seed7 parameters work in an abstract level. In many situations it is not necessary to think about implementation details like "by reference", "by value" or "address of". -------------------------------------------------- Sorry for the inconvenience. Regards, Thomas Mertes |
From: Thomas M. <tho...@gm...> - 2012-11-15 13:51:25
|
On Wed, 14 Nov 2012 02:31:09 +0100, joh...@so... wrote: > so can you assign to a member of a structured type passed as an actual > parameter, if using "in var"? if so, this is different from pascal "v: t" > which makes a value copy. "in var" does a value copy. For array and structured types this means that the whole array respectively struct is copied (it does a so-called deep copy). In the function the parameter can be changed, either by assigning a value to the parameter or (if it is structured) by assigning a value to a member of the structure. BUT: All the changes inside the function have no effect outside of the function. This means: The actual parameter stays unchanged. The following example shows the differences between "in var" and "inout": The type complex is defined in the library "complex.s7i". This library contains, beside other things, the definition of the following struct: const type: complex is new object struct var float: re is 0.0; var float: im is 0.0; end struct; Now we assume the following three variables were defined: var complex: a is complex(0.0, 1.0); var complex: b is complex(2.0, 3.0); var complex: c is complex(4.0, 5.0); The members re and im get the corresponding values from the initialization: | value | value variable | of re | of im ----------+-------+------- a | 0.0 | 1.0 b | 2.0 | 3.0 c | 4.0 | 5.0 The following function uses "in var" parameters: const proc: func1 (in var complex: par1, in var complex par2) is func begin par1 := c; # Assign new value par2.re := 6.0 # Assign new value to member # Now the parameters par1 and par2 have the new values. # The variables a, b and c stay unchanged. end func; Then the function func1 is called with the actual parameters a and b: func1(a, b); Afterwards the variables a, b and c still have the same values as before: | value | value variable | of re | of im ----------+-------+------- a | 0.0 | 1.0 b | 2.0 | 3.0 c | 4.0 | 5.0 With "inout" parameters this picture changes. The following function uses "inout" parameters: const proc: func2 (inout complex: par1, inout complex par2) is func begin par1 := c; # Assign new value par2.re := 6.0 # Assign new value to member # Now the parameters par1 and par2 have the new values. # The variables a and b were changed together with par1 and par2. # Variable c stays unchanged. end func; Then the function func2 is called with the actual parameters a and b: func2(a, b); Afterwards the values of the variables have changed: | value | value variable | of re | of im ----------+-------+------- a | 4.0 | 5.0 b | 2.0 | 6.0 c | 4.0 | 5.0 I hope this explanation helps. As you can see Seed7 parameters work in an abstract level. In many situations it is not necessary to think about implementation details like "by reference", "by value" or "address of". > yeah i think improving the FAQ entry is a good idea. just extend the table > to say what happens when you assign to a simple type, structured type, and > structure type members, for each of the four parameter types. I will look at that. Regards, Thomas Mertes |
From: Thomas M. <tho...@gm...> - 2012-11-13 15:06:30
|
On Tue, 13 Nov 2012 13:15:04 +0100, joh...@so... wrote: > hi, > > i have a very basic question about parameter types. i don't understand > them completely from your description in the FAQ. > > "val", "ref" and "in" are obvious. what about the difference between "in > var" and "inout"? > > i made an assumption here, and that is that "in var" is similar to "var v: > t" in pascal, ... No. "in var" is similar to "v: t" in Pascal. It is a call-by-value parameter, which can be changed inside the function. An assignment to a formal "in var" parameter is allowed, but it has only an effect inside the function. The actual parameter can be an expression or a variable and it cannot be changed from inside the function. A "val" parameter is also a call-by-value parameter, but it cannot be changed in the function (no assignment allowed). > while "inout" is similar to "var v: ^t" in pascal. am i > right? or are the semantics different? if so, could you explain them in > details? For simple types like integer, float and char an "inout" parameter is similar to "var v: t" in Pascal. For structured types like string, struct, hash and array an "inout" parameter is similar to "var v: ^t". But this difference ("var v: t" vs. "var v: ^t") is hidden from the user (there is no need to dereference explicitly). For an "inout" parameter the actual parameter must be a variable. It is allowed to do an assignment to the formal parameter in the function and this change takes an effect on the actual parameter. Summary: Assignments to formal "in var" and "inout" parameters are allowed. For "in var" the actual parameter stays unchanged. For "inout" the actual parameter changes immediately. Assignments to formal "val", "ref" and "in" parameters are not allowed. It seems that I need to improve the FAQ and the manual. Regards, Thomas Mertes |
From: <joh...@so...> - 2012-11-13 12:41:56
|
hi, i have a very basic question about parameter types. i don't understand them completely from your description in the FAQ. "val", "ref" and "in" are obvious. what about the difference between "in var" and "inout"? i made an assumption here, and that is that "in var" is similar to "var v: t" in pascal, while "inout" is similar to "var v: ^t" in pascal. am i right? or are the semantics different? if so, could you explain them in details? thanks in advance! johnny |
From: Thomas M. <tho...@gm...> - 2012-11-11 14:21:33
|
On Sun, 11 Nov 2012 00:56:27 +0100, Renato Lenzi <re...@gm...> wrote: > Hi there, i have a little question: > > var array integer: arr1 is 5 times 3; - this generates an array 1 > based with 5 items > var array integer: arr1 is [0] (1,2,3,4,5) - this generates an array 0 > based with 5 items > var array integer: arr1 is [0] 5 times 3; - this returns an error... > how can i create (if possible) an array 0 based with "times" sintax? The times-operator intended for this purpose is: [0 .. 4] times 3 An array declaration would be: var array integer: arr1 is [0 .. 4] times 3; This times-operator is described here: http://seed7.sourceforge.net/libraries/array.htm#%28in_ARRAY_IDX_RANGE%29times%28in_baseType%29 The manual contains also also a description of this times-operator. See: http://seed7.sourceforge.net/manual/types.htm#array Maybe this times-operator should also be mentioned elsewhere. Thank you for your questions. They help me to improve the descriptions. Regards, Thomas Mertes |
From: Renato L. <re...@gm...> - 2012-11-10 23:56:34
|
Hi there, i have a little question: var array integer: arr1 is 5 times 3; - this generates an array 1 based with 5 items var array integer: arr1 is [0] (1,2,3,4,5) - this generates an array 0 based with 5 items var array integer: arr1 is [0] 5 times 3; - this returns an error... how can i create (if possible) an array 0 based with "times" sintax? Best regards ---- Renato |
From: Thomas M. <tho...@gm...> - 2012-10-30 08:56:06
|
On Tue, 23 Oct 2012 00:39:31 +0200, Renato Lenzi <re...@gm...> wrote: > Even if i know that this is a difficult issue and the language itself > is not aimed to go there, but the question itself is simple :-) is > there any plan to support, in future, different backends like > javascript? In the moment I have no plans for other backends. The idea is interesting and in general it would be possible, but I have not the time to do it myself. > This is an interesting point because many modern language (Ceylon, > Kotlin, Fantom, Scala) have (or will have) this feature. > This doesn't affect how Seed7 is a good language, of course. Generating code for statements and expressions is probably not so hard. The Seed7 compiler comp.sd7 could be used as base. The problem is in the runtime library. The Seed7 runtime library provides the same functionality under Linux and Windows. The last estimation showed that 48% of the C code is in the runtime library. There are many alternative code paths, which take different C compiler and library features into account. This includes things like little/big-endian, twos complement representation, 32/64-bit, handling of divide by zero, IEEE 754 floating point conformance, does right shifting sign extend, etc. Other alternate code paths deal with C library differences. This includes questions like: - Does ftell() return -1 when it is called with a pipe? - Does fwrite() work for a read only file? - Is remove() able to remove an empty directory? - Can utime() change the access and modification times of a directory? - Has mkdir() one or two parameters? - Is the function localtime_r() available? - Which file functions must be used to have 64-bit file offsets? - Which operating system functions must be used for Unicode? There are also such things as different path delimiters and paths with and without drive letters. All this C library differences are balanced by the Seed7 runtime library. For new backends this things must be done also. I would really like to have other backends for Seed7. I have not the time to do it myself, but I offer to help, if you or someone else volunteers. Regards, Thomas Mertes |
From: Renato L. <re...@gm...> - 2012-10-22 22:39:38
|
Even if i know that this is a difficult issue and the language itself is not aimed to go there, but the question itself is simple :-) is there any plan to support, in future, different backends like javascript? This is an interesting point because many modern language (Ceylon, Kotlin, Fantom, Scala) have (or will have) this feature. This doesn't affect how Seed7 is a good language, of course. Regards -- Renato |
From: Thomas M. <tho...@gm...> - 2012-10-02 09:18:45
|
On Mon, 1 Oct 2012 00:37:48 +0200, Renato Lenzi <re...@gm...> wrote: > I don't fully understand the for sintax, that is i don't understand > how i can change the increment of the parameter. For example in C# i > can write: > > for (int x = 0; int < 10; x++) > { > ...... > } > > but also: > > for (int x = 0; x < 10; x+=2) or > for (int x = 0; x < 10; x+=3) etc.... > > this way i can modifying the amplitude of iterations. > Looking at the for declarations in Seed7 manual i guess i have to > change the amplitude inside the body of the loop. Is there another > way? A look at the for declarations in the Seed7 manual shows me, that I forgot to explain the for-step-statement. Your C# examples can be written in Seed7 with: for x range 0 to 9 step 2 do ... end for; for x range 0 to 9 step 3 do ... end for; In the first loop x will have the values 0, 2, 4, 6, 8. In the second loop x will have the values 0, 3, 6, 9. For-step-statements with downto are also possible: # Here x will have the values 10, 8, 6, 4, 2. for x range 10 downto 0 step 2 do ... end for; # Here x will have the values 10, 7, 4, 1. for x range 10 downto 0 step 3 do ... end for; I hope that this descriptions help you. I will add a more detailed description of the for-step-statement to the manual, as soon as I have time to do it. Regards, Thomas Mertes |
From: Renato L. <re...@gm...> - 2012-09-30 22:37:54
|
I don't fully understand the for sintax, that is i don't understand how i can change the increment of the parameter. For example in C# i can write: for (int x = 0; int < 10; x++) { ...... } but also: for (int x = 0; x < 10; x+=2) or for (int x = 0; x < 10; x+=3) etc.... this way i can modifying the amplitude of iterations. Looking at the for declarations in Seed7 manual i guess i have to change the amplitude inside the body of the loop. Is there another way? thx, regards. |
From: Thomas M. <tho...@gm...> - 2012-09-16 09:32:25
|
On Fri, 14 Sep 2012 22:22:23 +0200, Renato Lenzi <re...@gm...> wrote: > Here is a very simple code: > > > $ include "seed7_05.s7i"; > $ include "char.s7i"; > const proc: main is func > begin > end func; > > and here is what compiler says (Win7 64): There are some issues 1. Only the first include command, the one which includes "seed7_05.s7i", needs a $ sign. Later include commands should not use a $ sign. The include commands without $ maintain, what was already included and therefore they do not include something twice. 2. It is not necessary to include "char.s7i", since it is already included from "seed7_05.s7i". 3. The construct func begin ... end func; assumes that there are one or more statements between 'begin' and 'end'. Omitting the statement(s) between 'begin' and 'end' is like omitting a function parameter. For a missing function parameter you will get an error message. Likewise you get an error message when the statement(s) between 'begin' and 'end' are omitted. The empty statement is 'noop'. Just omitting a statement is not considered correct. > HI INTERPRETER Version 4.5.9553 Copyright (c) 1990-2012 Thomas Mertes > *** /d/seed7/lib/char.s7i(33):34: "char" declared twice > const type: char is subtype DISCRETE; > -----------------------------------------------^ Because "char.s7i" is included twice the type 'char' is defined twice. > *** /d/seed7/lib/char.s7i(129):34: (in integer param) chr declared twice > const func char: chr (in integer: number) is action > "CHR_CHR > "; > -------------------------------------------------------------------------------- > --^ Because "char.s7i" is included twice the function 'chr' is defined twice. > *** /d/seed7/lib/char.s7i(217):34: "EOF" declared twice > const char: EOF is chr(-1); > ---------------------------^ Because "char.s7i" is included twice the constant 'EOF' is defined twice. > *** char02.sd7(5):30: Expression expected found "func" > end func; > --------------^ This error is written, because there should be one or more statements between 'begin' and 'end'. The other errors below are triggered by this error message. > *** char02.sd7(5):47: "end" expected found "func" > end func; > --------------^ > *** char02.sd7(5):47: "func" expected found ";" > end func; > ---------------^ > *** char02.sd7(5):46: ";" expected found "END OF FILE" > > ^ > *** char02.sd7(3):51: Match for {func begin {end } } failed > begin > > > may be it's too late but i don't understand.... No problem. Hopefully the explanation helps. Currently const proc: main is func begin end func; and if condition then end if; are illegal. The legal versions of the examples above are const proc: main is func begin noop; end func; and if condition then noop; end if; Maybe there should be versions of statements, where statement parameters can be omitted. Regards, Thomas Mertes |
From: Renato L. <re...@gm...> - 2012-09-14 20:22:30
|
Here is a very simple code: $ include "seed7_05.s7i"; $ include "char.s7i"; const proc: main is func begin end func; and here is what compiler says (Win7 64): HI INTERPRETER Version 4.5.9553 Copyright (c) 1990-2012 Thomas Mertes *** /d/seed7/lib/char.s7i(33):34: "char" declared twice const type: char is subtype DISCRETE; -----------------------------------------------^ *** /d/seed7/lib/char.s7i(129):34: (in integer param) chr declared twice const func char: chr (in integer: number) is action "CHR_CHR "; -------------------------------------------------------------------------------- --^ *** /d/seed7/lib/char.s7i(217):34: "EOF" declared twice const char: EOF is chr(-1); ---------------------------^ *** char02.sd7(5):30: Expression expected found "func" end func; --------------^ *** char02.sd7(5):47: "end" expected found "func" end func; --------------^ *** char02.sd7(5):47: "func" expected found ";" end func; ---------------^ *** char02.sd7(5):46: ";" expected found "END OF FILE" ^ *** char02.sd7(3):51: Match for {func begin {end } } failed begin may be it's too late but i don't understand.... |
From: Thomas M. <tho...@gm...> - 2012-09-11 22:26:34
|
On 10 Sep 2012 11:19:38 +0200, joh...@so... wrote: > hi, > > i was looking at the seed7 language and am quite impressed with quite a > few things. Thank you. > however, there is something bothers me, because i found no answer or hint > anywhere. how do you free dynamically allocated memory? arrays and > structures defined inside a function are usually released when that function exits, > i found out this much. Yes, strings, arrays, hashes, structs and other structured data types manage their memory. E.g.: When an element is removed from a hash table the memory used by the element is freed as well as hash table internal data. And when a structured data type is freed all the data inside it is also freed. Intermediate results of expressions (which also can be structured data) are freed after they were used. I recently improved the FAQ answer, regarding garbage collection, a little bit. See: http://seed7.sourceforge.net/faq.htm#garbage_collection > but what if you have a ptr to something, Many languages rely heavily on pointers, respectively references. This either leads to explicit memory freeing or to garbage collection processes. In Seed7 pointers are not so heavily used. Seed7 encourages structured programming, which refers to structured statements and structured data types. A goto is not a structured statement. Statements like if, while, repeat, for, etc. should be used instead. A pointer is not a structured data type. Instead containers like array, hash, set, etc. should be used. As I said before, the structured data types manage their memory. This structured data approach allows a simple automatic memory management, which covers more than 99.9% of the data. For the remaining 0.1% of the data a different approach must be used. > or use the xalloc() function, or > store multiple references to an object? The interface types of Seed7 have this problem. An interface type cannot use the simple automatic memory management. > do you use something like reference > counting or is the allocated memory just never freed? Currently the memory is not freed, but it is planned to use reference counting. Sorry to disappoint you. I hope that this does not scare you off. Since pointers should be replaced by structured data types the interface and implementation types of the object orientation are the only types, which currently don't have managed memory. OO is used heavily in Seed7, but not to define container classes. Containers are defined with abstract data types instead. So you don't have trees, single or double linked lists, etc. In practice the memory leaks caused by interface types are much smaller than 0.1%. Because of the container types it is often not necessary to create new objects all the time. Many of the example programs don't have any leaks. If you have other questions, just ask. Regards, Thomas Mertes |
From: Thomas M. <tho...@gm...> - 2012-09-11 21:02:25
|
On Thu, 6 Sep 2012 00:03:09 +0200, Renato Lenzi <re...@gm...> wrote: > 1) i have to do this simple task: 4 div 3. Ok, i get 1. But what have > i to do if i'd like to obtain 1,333333333 instead of 1? 4 and 3 are integer numbers and div is the integer division operator. For a floating point division you need floating point numbers and the / division operator. E.g.: 4.0 / 3.0 If you have integer variables and the division should have a float result you need to convert the integers to float first. Seed7 does not support implicit type conversions so the the conversion must be done with the flt function: flt(dividend) / flt(divisor) > 2) why / is ok for floats but if i want to perform a division while > with integers i have to use "div"? That is why there are different > operators? This was inherited from Pascal/Modula/Ada. Additionally it opens the opportunity to create a rational number with / (see below). Note that there is another integer division operator mdiv, which acts different form div: div divides and truncates towards 0 mdiv divides and rounds downward towards minus infinite. For positive numbers div and mdiv give the same result. The result just differs when dividend or divisor (or both) are negative. There are also two remainder operators: rem which computes the remainder of a div division. mod which computes the modulo, which is the remainder of mod. The chapter describing the type integer contains tables for the behavior of 'div', 'rem', 'mdiv' and 'mod': http://seed7.sourceforge.net/manual/types.htm#integer The / operator could be overloaded to work for integers with: const func integer: (in integer: dividend) / (in integer: divisor) is action "INT_DIV"; In this case 4/3 would return 1. I decided to omit this definition from the predefined language. Alternatively the / operator could be overloaded to convert integers to float and to do the division afterwards: const func float: (in integer: dividend) / (in integer: divisor) is return flt(dividend) / flt(divisor); In this case 4/3 would return the float value 1.333333333 . I decided also against this possibility, because it looks like an implicit conversion. Instead the / operator, with two integer operands, is used to generate a rational number. This is defined in the library rational.s7i: http://seed7.sourceforge.net/libraries/rational.htm#%28in_integer%29/%28in_integer%29 This way, when rational.s7i is included, the statement writeln(4/3 digits 6) writes 1.333333 Rational numbers use a 32-bit integer numerator and denominator. Therefore they are rather limited (integer overflows are not checked). Alternatively there is the type bigInteger (defined in bigint.s7i), which allow writeln(4_ / 3_ digits 50) The statement above writes 1.33333333333333333333333333333333333333333333333333 What do you think about this design decisions? BTW: I already sent this answer directly to Renato Lenzi. I just forgot to send it to this group also. So I do it now. BTW 2: I added an answer to this question to the FAQ. see: http://seed7.sourceforge.net/faq.htm#div_operator Regards, Thomas Mertes |
From: <joh...@so...> - 2012-09-10 09:46:29
|
hi, i was looking at the seed7 language and am quite impressed with quite a few things. however, there is something bothers me, because i found no answer or hint anywhere. how do you free dynamically allocated memory? arrays and structures defined inside a function are usually released when that function exits, i found out this much. but what if you have a ptr to something, or use the xalloc() function, or store multiple references to an object? do you use something like reference counting or is the allocated memory just never freed? thanks in advance for the answer johnny |
From: Renato L. <re...@gm...> - 2012-09-05 22:03:16
|
1) i have to do this simple task: 4 div 3. Ok, i get 1. But what have i to do if i'd like to obtain 1,333333333 instead of 1? 2) why / is ok for floats but if i want to perform a division while with integers i have to use "div"? That is why there are different operators? Thx. Regards. |
From: Kobi L. <kob...@gm...> - 2012-08-13 17:52:16
|
Many thanks for all the info! kobi |
From: Thomas M. <tho...@gm...> - 2012-08-12 21:39:54
|
On Sat, 4 Aug 2012 14:05:18 +0200 Renato Lenzi <re...@gm...> wrote: > At any rate, it is remarkable how much information is available on > site. Congratulations, this is really important.... and very useful to > learn the basis of the language Thank you very much. Tell me when you miss something or when you have questions. Regards, Thomas Mertes |
From: Thomas M. <tho...@gm...> - 2012-08-12 20:25:49
|
On 2012-08-02 06:10 Kobi Lurie wrote: > On 08/01/2012 04:51 PM, Thomas Mertes wrote: >> In the meantime the existing documentation of the primitive actions at >> >> http://seed7.sourceforge.net/manual/actions.htm >> >> can be used to see how a foreign function call can be done. > ok, I'll look it up. > I think I'll start by learning the language with simple exercises, > algorithms or data structures. When you have questions, just ask. >> then, later, probably contribute as I go along. (but let's not promise > anything ;-) Okay. >> 2) gui - is there a gui library? >> Seed7 has a graphics library, but currently there is no gui library. >> Except for the Gtk-server connection library provided by Leonardo >> Cecchi. I have a plan to have an interface description and to use >> this description for a web based interface and for stand alone >> programs. But until I get massive support this will take very long, >> to be realized. > The graphics library looks really cool, from first impressions, it looks > suitable for lightweight games and small customized applications. > However for commercial development, I assume most users like to see a > familiar UI, while the developer would like to not be held back by > unimplemented widgets, which is where the mature gui libraries come in. Agree. My attemts to write a gui library are described below. When you need a gui library now I suggest you interface to an existing one. >>> It seems portability in the language >>> was a main concern, what do you feel about libraries such as fltk, or >>> preferrably wxwidgets? (or is there a home-brewn one? do you wish for >>> everything to be in one ecosystem?) >> Interfacing with a library is okay. I don't know fltk and I have >> only little knowledge about wxwidgets. Fitting a gui library fully >> into the Seed7 ecosystem is probably not easy. Is it possible to base >> a gui library on the Seed7 graphics library? I would like to avoid >> event loops in the user program (I hate event loops). I also don't >> like redraw events. It is just stupid when the program gets told: >> I just deleted your window and you should redraw it. >> What would programmers say, when this happens with files? >> But this are just my wishes. When you do the work you are allowed >> to ignore them. Feel free to add a cgi library to Seed7. I promise >> to add it to the release, when it is not buggy and somehow useable. > I don't know much about the web so probably cgi support will not come > from here. Sorry I made a typo. I wrote cgi instead of gui. I wanted to say: Feel free to add a gui library to Seed7. > I feel similarly about events. Since they can "jump" up on you, you > don't know where they came from, they're not in the code flow, so it's > harder to reason and figure things out, especially for a larger program. > > However what is the alternative? since in a gui application all the > widgets are ready to accept input. they are like entities themselves. > How would you do that with one codeflow? Maybe a system with input forms can be used. I am experimenting with a gui library based on cgi forms. The form describtions look like data structure descriptions. I would like a system where a user interface definition is useable for stand alone applications and for web (CGI) interfaces. But the realization will take a long time. Don't wait for it. > FWIW, If you're indeed going to implement a whole gui system, based on > the Graphics lib, I suggest looking at Rebol's gui dialect, which is the > nicest way I've seen for building GUIs. Moreover, maybe you can leverage > other's work for example cairo, agg, or clutter. > > Another promising option is QT's qml, which is an interpreted markup > language for ui. (similar to json in structure, css in definition, and > has some interaction, and conditional rules). > I don't know, however, if you can really make large applications with > qml, and still be able to keep things under control. > oh, there is also the way fantom do gui's which may be similar to what > you want to do on the web. > they compile the application both to java for the desktop (or c#, > configurable) and to javascript for the web. Thank you, for your suggestions. >> To add 1 to each array element the expression >> >> doMap(testArray, x, x+1) >> >> can be used. The map function looks a little bit like a for-loop. >> The variable x must be provided as parameter to doMap. > hmm.. how does anExpression (inside the for loop) know to take aVariable > as its parameter? > oh I see, they are just expanded to the external code x and the other x+1. > that's quite smart. > > Is it possible to make map generic? instead of an integer - it would > take a T, and return a T array? Yes, it is possible. See: http://seed7.sourceforge.net/examples/generic.htm I also added an example with a normal map function. See: http://seed7.sourceforge.net/examples/map.htm >>> 4) auxiliary and fancy stuff - >>> unit testing (and mocks), >> Currently no special support, but I don't see problems. >> The functionality of the Seed7 interpreter and compiler is checked >> with several programs. > I am sure the quality of your code is very high. It's my own feeble mind > I'm worried for :-) > It helps me to check myself, since if the program gets complicated with > time, it's harder to find the source of a bug. I know that you are talking about unit testing. I just want to mention that compiled Seed7 programs can be debugged with a source code debugger. Instructions in the generated C program refer to the original source. This way a source code debugger like gdb can be used. > In recent years there is also 'tdd' (test driven design) where unit > testing has become a continuous and part of the coding process. > mocks is about "faking" objects, usually by reflection, creating empty > functions and defaulted fields and storing the invocations, so for > example, you can test that your client code works, without connecting to > the server. > since you know what the server is supposed to return to you, you "fake" > the server object, returning canned responses that you prepared, and > later it's possible to verify what was called, how many times, etc. > Sometimes it helps, since you can get the program up and running fast, > and then fill all the holes with actual functionality. having a working > program is usually easier than waiting until all the code is finished > just to test it. Things can get complicated sometimes when a bug was > introduced but alot of code was written in one chunk, so which part is > good and which isn't? > I think mocking mainly arose from object oriented and events, which can > get messy. > An example library is moq. http://code.google.com/p/moq/ Thank you, for the hints. >>> design by contract, >> Currently no special support >>> ADA's argument ranges, >> Not sure what you mean with this. Seed7 supports positional >> parameters and does not support named parameters. > I saw that new version of Ada define ranges for the input parameters > as seen here for example: > http://en.wikipedia.org/wiki/Ada_(programming_language)#Data_types > I think this is a good feature. > probably just asserts in runtime, and is basically an invariant (like in > eiffel). > that's good in order to know that your data didn't get corrupted somehow, > and also (as you get the assert) you can know where that wrong data came > from. > this is basically the advantage for dbc (design by contract) too. > it's just a 'requires', that checks the input arguments. 'ensures' that > checks the result, > and an invariant which isn't in a function but in the class, so it > checks the object's state wasn't compromised. I see. >>> mixins, >> The functionality could probably be provided with Seed7 templates or >> abstract data types. >>> multiple inheritance, >> Not supported >>> events, >> I already explained, that I don't think that event loops are a good >> idea. But nobody hinders you to process events with Seed7. >>> fine grained accessibility (not just public private but having syntax >>> to limit to a function or class or with wildcards), >> Fine grained accessability is currently not supported. > Yes, this is somewhat experimental. didn't really expect it. more of a > feature request :-) >>> actors and network programming ... >> Not sure what you mean with this. Seed7 has support for networking >> (FTP, HTTP) and CGI. > I meant to ask about concurrency, threaded or actors-based, for example > in erlang there are lightweight processes, others use co-routines. > about networking, I am assuming sockets. Currently there is no threading / lightweight process support. There is socket support. The other networking support is based on socket support. Regards, Thomas Mertes |
From: Kobi L. <kob...@gm...> - 2012-08-02 06:10:57
|
On 08/01/2012 04:51 PM, Thomas Mertes wrote: > Welcome. Thanks! > Seed7 can call C library functions, but wrapper functions are necessary > to do it. Some of the types used by Seed7 are different from the ones > used by C (e.g. strings) In this case conversion functions must be > called. I suggest to have two wrapper functions: One that does the > type conversion, error checking, etc. and one that provides a so called > primitive action for the Seed7 interpreter. The primitive action must > also be defined in a Seed7 include library. I started to document the > FFI, but it will take some time. > > In the meantime the existing documentation of the primitive actions at > > http://seed7.sourceforge.net/manual/actions.htm > > can be used to see how a foreign function call can be done. ok, I'll look it up. I think I'll start by learning the language with simple exercises, algorithms or data structures. then, later, probably contribute as I go along. (but let's not promise anything ;-) >> 2) gui - is there a gui library? > Seed7 has a graphics library, but currently there is no gui library. > Except for the Gtk-server connection library provided by Leonardo > Cecchi. I have a plan to have an interface description and to use > this description for a web based interface and for stand alone > programs. But until I get massive support this will take very long, > to be realized. The graphics library looks really cool, from first impressions, it looks suitable for lightweight games and small customized applications. However for commercial development, I assume most users like to see a familiar UI, while the developer would like to not be held back by unimplemented widgets, which is where the mature gui libraries come in. >> It seems portability in the language >> was a main concern, what do you feel about libraries such as fltk, or >> preferrably wxwidgets? (or is there a home-brewn one? do you wish for >> everything to be in one ecosystem?) > Interfacing with a library is okay. I don't know fltk and I have > only little knowledge about wxwidgets. Fitting a gui library fully > into the Seed7 ecosystem is probably not easy. Is it possible to base > a gui library on the Seed7 graphics library? I would like to avoid > event loops in the user program (I hate event loops). I also don't > like redraw events. It is just stupid when the program gets told: > I just deleted your window and you should redraw it. > What would programmers say, when this happens with files? > But this are just my wishes. When you do the work you are allowed > to ignore them. Feel free to add a cgi library to Seed7. I promise > to add it to the release, when it is not buggy and somehow useable. I don't know much about the web so probably cgi support will not come from here. I feel similarly about events. Since they can "jump" up on you, you don't know where they came from, they're not in the code flow, so it's harder to reason and figure things out, especially for a larger program. However what is the alternative? since in a gui application all the widgets are ready to accept input. they are like entities themselves. How would you do that with one codeflow? FWIW, If you're indeed going to implement a whole gui system, based on the Graphics lib, I suggest looking at Rebol's gui dialect, which is the nicest way I've seen for building GUIs. Moreover, maybe you can leverage other's work for example cairo, agg, or clutter. Another promising option is QT's qml, which is an interpreted markup language for ui. (similar to json in structure, css in definition, and has some interaction, and conditional rules). I don't know, however, if you can really make large applications with qml, and still be able to keep things under control. oh, there is also the way fantom do gui's which may be similar to what you want to do on the web. they compile the application both to java for the desktop (or c#, configurable) and to javascript for the web. > >> 3) are functions first class? for example, to define 'map', I would >> pass as arguments, the list and a lambda, or a function name. >> delegates, quotations, lambdas, it has different names. is this >> concept supported? > Seed7 supports a 'map' function, but lambdas are not used. Some half > prepared 'map' function example for the Homepage exists. I just copy > part of this example below. The map function is defined with: > > const func array integer: doMap (in array integer: anArray, > inout integer: aVariable, ref func integer: anExpression) is func > > result > var array integer: result is 0 times 0; > begin > for aVariable range anArray do > result &:= anExpression; > end for; > end func; > > To add 1 to each array element the expression > > doMap(testArray, x, x+1) > > can be used. The map function looks a little bit like a for-loop. > The variable x must be provided as parameter to doMap. hmm.. how does anExpression (inside the for loop) know to take aVariable as its parameter? oh I see, they are just expanded to the external code x and the other x+1. that's quite smart. Is it possible to make map generic? instead of an integer - it would take a T, and return a T array? > >> 4) auxiliary and fancy stuff - >> unit testing (and mocks), > Currently no special support, but I don't see problems. > The functionality of the Seed7 interpreter and compiler is checked > with several programs. I am sure the quality of your code is very high. It's my own feeble mind I'm worried for :-) It helps me to check myself, since if the program gets complicated with time, it's harder to find the source of a bug. In recent years there is also 'tdd' (test driven design) where unit testing has become a continuous and part of the coding process. mocks is about "faking" objects, usually by reflection, creating empty functions and defaulted fields and storing the invocations, so for example, you can test that your client code works, without connecting to the server. since you know what the server is supposed to return to you, you "fake" the server object, returning canned responses that you prepared, and later it's possible to verify what was called, how many times, etc. Sometimes it helps, since you can get the program up and running fast, and then fill all the holes with actual functionality. having a working program is usually easier than waiting until all the code is finished just to test it. Things can get complicated sometimes when a bug was introduced but alot of code was written in one chunk, so which part is good and which isn't? I think mocking mainly arose from object oriented and events, which can get messy. An example library is moq. http://code.google.com/p/moq/ >> design by contract, > Currently no special support >> ADA's argument ranges, > Not sure what you mean with this. Seed7 supports positional > parameters and does not support named parameters. I saw that new version of Ada define ranges for the input parameters as seen here for example: http://en.wikipedia.org/wiki/Ada_(programming_language)#Data_types I think this is a good feature. probably just asserts in runtime, and is basically an invariant (like in eiffel). that's good in order to know that your data didn't get corrupted somehow, and also (as you get the assert) you can know where that wrong data came from. this is basically the advantage for dbc (design by contract) too. it's just a 'requires', that checks the input arguments. 'ensures' that checks the result, and an invariant which isn't in a function but in the class, so it checks the object's state wasn't compromised. >> mixins, > The functionality could probably be provided with Seed7 templates or > abstract data types. >> multiple inheritance, > Not supported >> events, > I already explained, that I don't think that event loops are a good > idea. But nobody hinders you to process events with Seed7. >> fine grained accessibility (not just public private but having syntax >> to limit to a function or class or with wildcards), > Fine grained accessability is currently not supported. Yes, this is somewhat experimental. didn't really expect it. more of a feature request :-) >> actors and network programming ... > Not sure what you mean with this. Seed7 has support for networking > (FTP, HTTP) and CGI. I meant to ask about concurrency, threaded or actors-based, for example in erlang there are lightweight processes, others use co-routines. about networking, I am assuming sockets. Bye and thanks for all the info kobi -- Help stop the persecution of Falun Gong in China. http://www.faluninfo.net |
From: Thomas M. <tho...@gm...> - 2012-08-01 13:51:14
|
At Mon, 30 Jul 2012 11:16:19 +0300 Kobi Lurie <kob...@gm...> wrote: > Hello, > > I just recently heard of seed7, and have an interest in extensible > programming languages to suit my coding style and requirements. Welcome. > seed7 looks like a fun language to work with and may become a language > of choice for projects and work, or just as a fun hobby, if it is > capable enough. > > so that's why I'm here, and since I just discovered seed7, would like > to ask about what I didn't find yet: > > 1) bindings - does seed7 have a foreign function interface (FFI)? that > is, can I use libraries from c/c++, by creating a wrapper of some > sort? Seed7 can call C library functions, but wrapper functions are necessary to do it. Some of the types used by Seed7 are different from the ones used by C (e.g. strings) In this case conversion functions must be called. I suggest to have two wrapper functions: One that does the type conversion, error checking, etc. and one that provides a so called primitive action for the Seed7 interpreter. The primitive action must also be defined in a Seed7 include library. I started to document the FFI, but it will take some time. In the meantime the existing documentation of the primitive actions at http://seed7.sourceforge.net/manual/actions.htm can be used to see how a foreign function call can be done. > 2) gui - is there a gui library? Seed7 has a graphics library, but currently there is no gui library. Except for the Gtk-server connection library provided by Leonardo Cecchi. I have a plan to have an interface description and to use this description for a web based interface and for stand alone programs. But until I get massive support this will take very long, to be realized. > It seems portability in the language > was a main concern, what do you feel about libraries such as fltk, or > preferrably wxwidgets? (or is there a home-brewn one? do you wish for > everything to be in one ecosystem?) Interfacing with a library is okay. I don't know fltk and I have only little knowledge about wxwidgets. Fitting a gui library fully into the Seed7 ecosystem is probably not easy. Is it possible to base a gui library on the Seed7 graphics library? I would like to avoid event loops in the user program (I hate event loops). I also don't like redraw events. It is just stupid when the program gets told: I just deleted your window and you should redraw it. What would programmers say, when this happens with files? But this are just my wishes. When you do the work you are allowed to ignore them. Feel free to add a cgi library to Seed7. I promise to add it to the release, when it is not buggy and somehow useable. > 3) are functions first class? for example, to define 'map', I would > pass as arguments, the list and a lambda, or a function name. > delegates, quotations, lambdas, it has different names. is this > concept supported? Seed7 supports a 'map' function, but lambdas are not used. Some half prepared 'map' function example for the Homepage exists. I just copy part of this example below. The map function is defined with: const func array integer: doMap (in array integer: anArray, inout integer: aVariable, ref func integer: anExpression) is func result var array integer: result is 0 times 0; begin for aVariable range anArray do result &:= anExpression; end for; end func; To add 1 to each array element the expression doMap(testArray, x, x+1) can be used. The map function looks a little bit like a for-loop. The variable x must be provided as parameter to doMap. > how should the signature definition look like? Signature definitions are not used for the map function. > 4) auxiliary and fancy stuff - > unit testing (and mocks), Currently no special support, but I don't see problems. The functionality of the Seed7 interpreter and compiler is checked with several programs. > design by contract, Currently no special support > ADA's argument ranges, Not sure what you mean with this. Seed7 supports positional parameters and does not support named parameters. > mixins, The functionality could probably be provided with Seed7 templates or abstract data types. > multiple inheritance, Not supported > events, I already explained, that I don't think that event loops are a good idea. But nobody hinders you to process events with Seed7. > fine grained accessibility (not just public private but having syntax > to limit to a function or class or with wildcards), Fine grained accessability is currently not supported. > actors and network programming ... Not sure what you mean with this. Seed7 has support for networking (FTP, HTTP) and CGI. > which of these are supported or intentionally not supported, and to > what degree? (this helps me see which direction the language is headed > to, what it mainly wants to accomplish) > > That's it. sorry for the demanding questions. I understand you work on > this alone, and that's one monumental task. Hope to not take too much > of your time. > > I quite like all your choices so far, and may become an avid user :-) Great. > Thanks in advance, kobi I hope that my answers are detailed enough. Feel free to ask more. Regards, Thomas Mertes |
From: Thomas M. <tho...@gm...> - 2012-08-01 13:49:32
|
At Tue, 31 Jul 2012 20:13:34 +0200 Renato Lenzi <re...@gm...> wrote: > Hi there. I'm a newcomer in the Seed7 World. It seems to me a very > interesting language. Is the project live and growing? Yes, of course. :-) > Which are the ideas for the future. I have a lot of ideas, but I need help to reach the goals. I would like to have a system for user interfaces. Something where a user interface definition is useable for stand alone applications and for web (CGI) interfaces. I have a simple prototype for the web interface. I also started with experiments to remote control another console program (e.g. a debugger). This way I would like to create a Seed7 debugger, which uses gdb as backend. Shortly I experimented with self-extracting archive programs written in Seed7. This can be used to create self-extracting Seed7 packages. I would like to introduce the type dirEntry. It should be an interface type to access files and directories of user defined file systems. This could interface to tar or other archives and also to other computers via ftp or http. Last year I started with a port to Android. This port is not finished, because the Open GL ES library misses some features, that I need. The Seed7 graphics library can be used without accounting for redraw events. Filled polygons are not fully supported by the Open GL ES (only convex polygons are supported). I had not the time to add all the missing functionality to the Seed7 graphic library. Currently I revise the Seed7 libraries. This leads to better automatically generated documentation. It should also lead to a construction kit of libraries. This construction kit can be used to create a new versions of Seed7 or to support the definition of totally different language. > I'll spend a bit of time with pleasure on this > language. > Regards. Regards, Thomas Mertes |
From: Renato L. <re...@gm...> - 2012-07-31 18:13:40
|
Hi there. I'm a newcomer in the Seed7 World. It seems to me a very interesting language. Is the project live and growing? Which are the ideas for the future. I'll spend a bit of time with pleasure on this language. Regards. |
From: Kobi L. <kob...@gm...> - 2012-07-30 08:16:29
|
Hello, I just recently heard of seed7, and have an interest in extensible programming languages to suit my coding style and requirements. seed7 looks like a fun language to work with and may become a language of choice for projects and work, or just as a fun hobby, if it is capable enough. so that's why I'm here, and since I just discovered seed7, would like to ask about what I didn't find yet: 1) bindings - does seed7 have a foreign function interface (FFI)? that is, can I use libraries from c/c++, by creating a wrapper of some sort? 2) gui - is there a gui library? It seems portability in the language was a main concern, what do you feel about libraries such as fltk, or preferrably wxwidgets? (or is there a home-brewn one? do you wish for everything to be in one ecosystem?) 3) are functions first class? for example, to define 'map', I would pass as arguments, the list and a lambda, or a function name. delegates, quotations, lambdas, it has different names. is this concept supported? how should the signature definition look like? 4) auxiliary and fancy stuff - unit testing (and mocks), design by contract, ADA's argument ranges, mixins, multiple inheritance, events, fine grained accessibility (not just public private but having syntax to limit to a function or class or with wildcards), actors and network programming ... which of these are supported or intentionally not supported, and to what degree? (this helps me see which direction the language is headed to, what it mainly wants to accomplish) That's it. sorry for the demanding questions. I understand you work on this alone, and that's one monumental task. Hope to not take too much of your time. I quite like all your choices so far, and may become an avid user :-) Thanks in advance, kobi |